Пример #1
0
    def test_human_tz(self):
        t = Time(2014, 4, 18, 0, 0, 0)

        d = Date(2014, 4, 18)
        with MockNow(t):
            assert_equal(d.to_human(), 'today')
            assert_equal(d.to_human(tz='US/Pacific'), 'tomorrow')
Пример #2
0
    def test_human_tz(self):
        t = Time(2014, 4, 18, 0, 0, 0)

        d = Date(2014, 4, 18)
        with MockNow(t):
            assert_equal(d.to_human(), 'today')
            assert_equal(d.to_human(tz='US/Pacific'), 'tomorrow')
Пример #3
0
    def test_human(self):
        d = Date(2014, 4, 18)

        # This might fail under different locale?
        assert_equal(d.to_human(), "Apr 18")
Пример #4
0
    def test_human(self):
        d = Date(2014, 4, 18)

        # This might fail under different locale?
        assert_equal(d.to_human(), "Apr 18")