예제 #1
0
 def test_reject_commission(self):
     """Test function call of reject_commission"""
     global token, auth_url
     try:
         client = AstakosClient(token['id'], auth_url)
         client.reject_commission(57)
     except Exception as err:
         self.fail("Shouldn't raise Exception %s" % err)
예제 #2
0
파일: tests.py 프로젝트: AthinaB/synnefo
 def test_reject_commission(self):
     """Test function call of reject_commission"""
     global token, auth_url
     try:
         client = AstakosClient(token['id'], auth_url)
         client.reject_commission(57)
     except Exception as err:
         self.fail("Shouldn't raise Exception %s" % err)
예제 #3
0
 def test_reject_commission(self):
     """Test function call of reject_commission"""
     global token_1
     _mock_request([_request_ok])
     try:
         client = AstakosClient("https://example.com")
         client.reject_commission(token_1, 57)
     except Exception as err:
         self.fail("Shouldn't raise Exception %s" % err)
예제 #4
0
 def test_accept_commission_not_found(self):
     """Test function call of accept_commission with wrong serial"""
     global token, auth_url
     try:
         client = AstakosClient(token['id'], auth_url)
         client.reject_commission(20)
     except NotFound:
         pass
     except Exception as err:
         self.fail("Shouldn't raise Exception %s" % err)
     else:
         self.fail("Should have raised NotFound")
예제 #5
0
파일: tests.py 프로젝트: AthinaB/synnefo
 def test_accept_commission_not_found(self):
     """Test function call of accept_commission with wrong serial"""
     global token, auth_url
     try:
         client = AstakosClient(token['id'], auth_url)
         client.reject_commission(20)
     except NotFound:
         pass
     except Exception as err:
         self.fail("Shouldn't raise Exception %s" % err)
     else:
         self.fail("Should have raised NotFound")
예제 #6
0
 def test_accept_commission_not_found(self):
     """Test function call of accept_commission with wrong serial"""
     global token_1
     _mock_request([_request_ok])
     try:
         client = AstakosClient("https://example.com")
         client.reject_commission(token_1, 20)
     except NotFound:
         pass
     except Exception as err:
         self.fail("Shouldn't raise Exception %s" % err)
     else:
         self.fail("Should have raised NotFound")