Guest User

Untitled

a guest
Jun 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. diff --git a/pyblosxom/tests/unit/test_entries.py b/pyblosxom/tests/unit/test_entries.py
  2. index b676666..941b81a 100644
  3. --- a/pyblosxom/tests/unit/test_entries.py
  4. +++ b/pyblosxom/tests/unit/test_entries.py
  5. @@ -10,7 +10,8 @@ from Pyblosxom.tools import STANDARD_FILTERS
  6. from Pyblosxom.pyblosxom import Request
  7. from Pyblosxom.entries.base import EntryBase, generate_entry
  8.  
  9. -TIME1 = (2008, 7, 21, 12, 51, 47, 0, 203, 1)
  10. +# TIME1 = (2008, 7, 21, 12, 51, 47, 0, 203, 1)
  11. +TIME1 = time.strptime("7/21/2008 11:51:47", "%m/%d/%Y %H:%M:%S")
  12.  
  13. class TestEntryBase:
  14. def test_data(self):
  15. @@ -44,17 +45,17 @@ class TestEntryBase:
  16. e = EntryBase(req_())
  17. e.setTime(TIME1)
  18. for mem in (("timetuple", TIME1),
  19. - ("mtime", 1216659107.0),
  20. - ("ti", "12:51"),
  21. + ("mtime", 1216655507.0),
  22. + ("ti", "11:51"),
  23. ("mo", "Jul"),
  24. ("mo_num", "07"),
  25. ("da", "21"),
  26. ("dw", "Monday"),
  27. ("yr", "2008"),
  28. - ("fulltime", "20080721125147"),
  29. + ("fulltime", "20080721115147"),
  30. ("date", "Mon, 21 Jul 2008"),
  31. - ("w3cdate", "2008-07-21T16:51:47Z"),
  32. - ("rfc822date", "Mon, 21 Jul 2008 16:51 GMT")):
  33. + ("w3cdate", "2008-07-21T15:51:47Z"),
  34. + ("rfc822date", "Mon, 21 Jul 2008 15:51 GMT")):
  35. yield eq_, e[mem[0]], mem[1], \
  36. "%s != %s (note: this is a locale dependent test)" % (mem[0], mem[1])
  37.  
  38. @@ -119,7 +120,7 @@ class TestEntryBase:
  39.  
  40. yield eq_, e["foo"], "bar"
  41. yield eq_, e["body"], "entry body"
  42. - yield eq_, e["rfc822date"], "Mon, 21 Jul 2008 16:51 GMT"
  43. + yield eq_, e["rfc822date"], "Mon, 21 Jul 2008 15:51 GMT"
  44.  
  45. e = generate_entry(req_(), {"foo": "bar"}, "entry body")
Add Comment
Please, Sign In to add comment