Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
fix a small bst to utc bug in test
Browse files Browse the repository at this point in the history
  • Loading branch information
venusbb committed Jul 13, 2018
1 parent 23a7b9d commit 42d12c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions features/read_api/status.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Feature: the read/status api
and I have a record updated "10 seconds" ago in the "recent" data_set
when I go to "/_status/data-sets"
then I should get back a status of "200"
and I should get back the status of "ok"

Scenario: checking an out-of-date data_set
Given I have a data_set named "recent" with settings
Expand Down
2 changes: 1 addition & 1 deletion features/steps/read_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def step(context, fixture_name, data_set_name):

@given('I have a record updated "{timespan}" ago in the "{data_set_name}" data_set')
def step(context, timespan, data_set_name):
now = datetime.datetime.now()
now = datetime.datetime.now(pytz.UTC)
number_of_seconds = int(re.match(r'^(\d+) seconds?', timespan).group(1))
timedelta = datetime.timedelta(seconds=number_of_seconds)
updated = now - timedelta
Expand Down

0 comments on commit 42d12c3

Please sign in to comment.