示例#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")