예제 #1
0
 def test(self, text):
     entry = Entry.from_string(text)
     self.assertIsNone(entry)
예제 #2
0
 def test(self, name, expected_datetime, expected_name):
     entry = Entry.from_string(name)
     self.assertEqual(entry.datetime, expected_datetime)
     self.assertEqual(entry.name, expected_name)
예제 #3
0
파일: test_entry.py 프로젝트: 6871d0db/utt
 def test(self, text):
     entry = Entry.from_string(text)
     self.assertIsNone(entry)
예제 #4
0
def entries(local_timezone):
    entry_list = [
        Entry(datetime.datetime(2014, 3, 14, 8, 0), "hello", False),
        Entry(datetime.datetime(2014, 3, 14, 9, 0), "hard work", False),
        Entry(datetime.datetime(2014, 3, 17, 9, 0), "hello", False),
        Entry(datetime.datetime(2014, 3, 17, 10, 15), "hard work", False),
        Entry(datetime.datetime(2014, 3, 19, 9, 0), "hello", False),
        Entry(datetime.datetime(2014, 3, 19, 12, 0), "asd: A-526", False),
        Entry(datetime.datetime(2014, 3, 19, 13, 0), "lunch**", False),
        Entry(datetime.datetime(2014, 3, 19, 14, 0), "hard work", False),
        Entry(datetime.datetime(2014, 3, 19, 14, 15), "qwer: b-73", False),
        Entry(datetime.datetime(2014, 3, 19, 14, 30), "asd: A-526", False),
        Entry(datetime.datetime(2014, 3, 19, 14, 45), "qwer: C-123", False),
        Entry(datetime.datetime(2014, 3, 19, 15, 0), "qwer: a-9", False),
        Entry(datetime.datetime(2014, 3, 19, 16, 0), "black out ***", False),
        Entry(datetime.datetime(2014, 3, 19, 16, 30), "A: z-8", False),
    ]

    for entry in entry_list:
        entry.datetime = local_timezone.localize(entry.datetime)

    return InMemoryEntries(entry_list)
예제 #5
0
파일: test_entry.py 프로젝트: 6871d0db/utt
 def test(self, name, expected_datetime, expected_name):
     entry = Entry.from_string(name)
     self.assertEqual(entry.datetime, expected_datetime)
     self.assertEqual(entry.name, expected_name)