From: Plamen Dimitrov Date: Tue, 10 Jul 2012 08:07:13 +0000 (+0200) Subject: Revert setup method in test class because of unittest library naming conventions X-Git-Url: http://developer.intra2net.com/git/?p=imap-fix-internaldate;a=commitdiff_plain;h=d91be016a3decb753b028aced90caea7358a5d2f Revert setup method in test class because of unittest library naming conventions --- diff --git a/src/unit_tester.py b/src/unit_tester.py index 2175f00..ccd6eb2 100644 --- a/src/unit_tester.py +++ b/src/unit_tester.py @@ -24,14 +24,15 @@ class DateParseTester(unittest.TestCase): # class attributes # DateInterpreter instance testing the DateInterpreter methods - date_interp = MailDateParser() + date_interp = None # datetime for comparison with extracted datetimes and assertions - true_date = datetime.datetime(2007, 12, 11, 18, 24, 35) + true_date = None - def set_up(self): + # wrong naming conventions are due to python unittest library + def setUp(self): """Prepares the testing confitions.""" - # tester has problems if object is set to none so - # attributes are prepared above + self.date_interp = MailDateParser() + self.true_date = datetime.datetime(2007, 12, 11, 18, 24, 35) def test_received_date_extraction1(self): """Tests the date extraction method."""