diff --git a/test/test_convert.py b/test/test_convert.py index 12d13d5..dc9cd47 100644 --- a/test/test_convert.py +++ b/test/test_convert.py @@ -9,16 +9,72 @@ class TestConvert(unittest.TestCase): + test_xml = ( + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '
' + '
' + ) + def test_get_subjects(self): - c = Convert("table.xml") + c = Convert(self.test_xml) self.assertGreater(len(c.get_subjects()), 0) def test_get_calendar(self): - c = Convert("table.xml") + c = Convert(self.test_xml) c.get_calendar(c.get_subjects(), "20180301", "20181231") def test_get_nearest_date(self): - c = Convert("table.xml") + c = Convert(self.test_xml) self.assertEqual(c.get_nearest_date(start_date="20180301", weekday=4), parser.parse("20180302")) if __name__ == '__main__': diff --git a/test/test_everytime.py b/test/test_everytime.py deleted file mode 100644 index 1967f33..0000000 --- a/test/test_everytime.py +++ /dev/null @@ -1,13 +0,0 @@ -import unittest - -from everytime import Everytime - - -class TestEveryTime(unittest.TestCase): - def test_get_request(self): - e = Everytime() - print(e.get_timetable('', '', '2017', '1')) - - -if __name__ == '__main__': - unittest.main()