Skip to content

Commit

Permalink
Adding timezone information to github test.
Browse files Browse the repository at this point in the history
  • Loading branch information
coddingtonbear committed Apr 15, 2014
1 parent 595f454 commit 5e158c9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_github.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import datetime

import pytz

from bugwarrior.services.github import GithubService

from .base import ServiceTest
Expand All @@ -17,9 +19,9 @@ def setUp(self):

def test_to_taskwarrior(self):
arbitrary_created = (
datetime.datetime.now() - datetime.timedelta(hours=1)
)
arbitrary_updated = datetime.datetime.now()
datetime.datetime.utcnow() - datetime.timedelta(hours=1)
).replace(tzinfo=pytz.UTC)
arbitrary_updated = datetime.datetime.utcnow().replace(tzinfo=pytz.UTC)
arbitrary_issue = {
'title': 'Hallo',
'html_url': 'http://whanot.com/',
Expand Down

2 comments on commit 5e158c9

@ralphbean
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is now failing for me due to some mismatch with utc tz types.

@ralphbean
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is now failing for me due to some mismatch with utc tz types.

Nevermind, it was a red herring. Fixed in 85d9a68

Please sign in to comment.