replaced check for HTTP status OK with common step
parent
2f459597c5
commit
9402fc6eb7
|
@ -5,4 +5,5 @@ Feature: Manage account profiles
|
|||
Scenario: Retrieve authenticated user's account
|
||||
Given an authenticated user
|
||||
When a user requests their profile
|
||||
Then user profile is returned
|
||||
Then the request will be successful
|
||||
And user profile is returned
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from datetime import date
|
||||
from http import HTTPStatus
|
||||
import json
|
||||
|
||||
from behave import then, when
|
||||
|
@ -15,7 +14,6 @@ def call_account_endpoint(context):
|
|||
|
||||
@then('user profile is returned')
|
||||
def validate_response(context):
|
||||
assert_that(context.response.status_code, equal_to(HTTPStatus.OK))
|
||||
response_data = json.loads(context.response.data)
|
||||
assert_that(
|
||||
response_data['emailAddress'],
|
||||
|
|
Loading…
Reference in New Issue