예제 #1
0
 def test_add_account(self):
     account_response = AccountProcessor.add_account("paypal", "testAdmin")
     account = AccountProcessor.get_account(account_response["_id"])
     assert account_response
     assert account_response["_id"] == account["_id"]
     assert account_response["name"] == account["name"]
     account_response = AccountProcessor.add_account("ebay", "testAdmin")
     account = AccountProcessor.get_account(account_response["_id"])
     assert account_response
     assert account_response["_id"] == account["_id"]
     assert account_response["name"] == account["name"]
예제 #2
0
 def test_add_none_account(self):
     with pytest.raises(AppException):
         AccountProcessor.add_account(None, "testAdmin")
예제 #3
0
 def test_add_empty_account(self):
     with pytest.raises(AppException):
         AccountProcessor.add_account(" ", "testAdmin")
예제 #4
0
 def test_add_duplicate_account_case_insentive(self):
     with pytest.raises(Exception):
         AccountProcessor.add_account("PayPal", "testAdmin")
예제 #5
0
 def test_add_duplicate_account(self):
     with pytest.raises(Exception):
         AccountProcessor.add_account("paypal", "testAdmin")