Exemple #1
0
 def test_import_and_obtain_with_lists(self):
     t = test_date(None)
     t.add(2002, 1, 1)
     t.add(2002, 1, 2)
     from testfixtures import Replacer
     r = Replacer()
     r.replace('testfixtures.tests.sample1.today', t.today)
     try:
         compare(sample1.str_today_2(), '2002-01-01')
         compare(sample1.str_today_2(), '2002-01-02')
     finally:
         r.restore()
    def test_import_and_obtain_with_lists(self):

        t = test_date(None)
        t.add(2002, 1, 1)
        t.add(2002, 1, 2)

        from testfixtures import Replacer
        r = Replacer()
        r.replace('testfixtures.tests.sample1.today', t.today)
        try:
            compare(sample1.str_today_2(), '2002-01-01')
            compare(sample1.str_today_2(), '2002-01-02')
        finally:
            r.restore()
Exemple #3
0
 def test_something():
     compare(sample1.str_today_2(), '2001-01-01')