Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rbi-aap committed Jun 7, 2024
1 parent 73a0b14 commit fcf0f01
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions features/steps/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
)
import logging


@when('we save API token')
def step_save_token(context):
context.headers.append(('Authorization', context.news_api_tokens.get('_id')))
Expand Down Expand Up @@ -63,6 +64,7 @@ def we_set_api_time_limit(context, value):
with context.app.test_request_context():
get_settings_collection().insert_one({"_id": "general_settings", "values": {"news_api_time_limit_days": value}})


@then('we "{get}" "{text}" in atom xml response')
def we_get_text_in_atom_xml_response(context, get, text):
with context.app.test_request_context(context.app.config['URL_PREFIX']):
Expand All @@ -74,6 +76,7 @@ def we_get_text_in_atom_xml_response(context, get, text):
else:
assert (text not in get_body(context.response))


@then('we "{get}" "{text}" in syndicate xml response')
def we_get_text_in_syndicate_xml_response(context, get, text):
with context.app.test_request_context(context.app.config['URL_PREFIX']):
Expand Down

0 comments on commit fcf0f01

Please sign in to comment.