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"]
def test_add_none_account(self): with pytest.raises(AppException): AccountProcessor.add_account(None, "testAdmin")
def test_add_empty_account(self): with pytest.raises(AppException): AccountProcessor.add_account(" ", "testAdmin")
def test_add_duplicate_account_case_insentive(self): with pytest.raises(Exception): AccountProcessor.add_account("PayPal", "testAdmin")
def test_add_duplicate_account(self): with pytest.raises(Exception): AccountProcessor.add_account("paypal", "testAdmin")