You've already forked hotpocket
BTHLABS-61: Service layer refactoring
A journey to fix `ValidationError` in Pocket imports turned service layer refactoring :D
This commit is contained in:
@@ -77,10 +77,11 @@ def test_auth_key_not_found(null_uuid,
|
||||
|
||||
call_result = result.json()
|
||||
assert 'error' in call_result
|
||||
assert call_result['error']['data'].startswith(
|
||||
assert call_result['error']['code'] == -32001
|
||||
assert call_result['error']['message'].startswith(
|
||||
'Auth Key not found',
|
||||
)
|
||||
assert call_auth_key in call_result['error']['data']
|
||||
assert call_auth_key in call_result['error']['message']
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@@ -108,10 +109,11 @@ def test_deleted_auth_key(deleted_auth_key_out,
|
||||
|
||||
call_result = result.json()
|
||||
assert 'error' in call_result
|
||||
assert call_result['error']['data'].startswith(
|
||||
assert call_result['error']['code'] == -32001
|
||||
assert call_result['error']['message'].startswith(
|
||||
'Auth Key not found',
|
||||
)
|
||||
assert call_auth_key in call_result['error']['data']
|
||||
assert call_auth_key in call_result['error']['message']
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@@ -139,10 +141,11 @@ def test_expired_auth_key(expired_auth_key_out,
|
||||
|
||||
call_result = result.json()
|
||||
assert 'error' in call_result
|
||||
assert call_result['error']['data'].startswith(
|
||||
assert call_result['error']['code'] == -32000
|
||||
assert call_result['error']['message'].startswith(
|
||||
'Auth Key expired',
|
||||
)
|
||||
assert call_auth_key in call_result['error']['data']
|
||||
assert call_auth_key in call_result['error']['message']
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@@ -170,10 +173,11 @@ def test_consumed_auth_key(consumed_auth_key,
|
||||
|
||||
call_result = result.json()
|
||||
assert 'error' in call_result
|
||||
assert call_result['error']['data'].startswith(
|
||||
assert call_result['error']['code'] == -32000
|
||||
assert call_result['error']['message'].startswith(
|
||||
'Auth Key already consumed',
|
||||
)
|
||||
assert call_auth_key in call_result['error']['data']
|
||||
assert call_auth_key in call_result['error']['message']
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@@ -201,4 +205,5 @@ def test_inactive_account(inactive_account_auth_key,
|
||||
|
||||
call_result = result.json()
|
||||
assert 'error' in call_result
|
||||
assert str(inactive_account.pk) in call_result['error']['data']
|
||||
assert call_result['error']['code'] == -32001
|
||||
assert str(inactive_account.pk) in call_result['error']['message']
|
||||
|
||||
Reference in New Issue
Block a user