Revert setup method in test class because of unittest library naming conventions
authorPlamen Dimitrov <plamen.dimitrov@intra2net.com>
Tue, 10 Jul 2012 08:07:13 +0000 (10:07 +0200)
committerPlamen Dimitrov <plamen.dimitrov@intra2net.com>
Tue, 10 Jul 2012 08:07:13 +0000 (10:07 +0200)
src/unit_tester.py

index 2175f00..ccd6eb2 100644 (file)
@@ -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."""