def test_import_and_obtain_with_lists(self): t = test_datetime(None) t.add(2002,1,1,1,0,0) t.add(2002,1,1,2,0,0) from testfixtures import Replacer r = Replacer() r.replace('testfixtures.tests.sample1.now',t.now) try: compare(sample1.str_now_2(),'2002-01-01 01:00:00') compare(sample1.str_now_2(),'2002-01-01 02:00:00') finally: r.restore()
def test_something(): compare(sample1.str_now_2(),'2001-01-01 00:00:00')