comparison test/test_status.py @ 32:b1235080e694

add more tests for status defaults
author Bernhard Herzog <bh@intevation.de>
date Thu, 15 Mar 2007 11:48:13 +0100
parents f9f15ee39ed7
children 086c68ca51d2
comparison
equal deleted inserted replaced
30:22192fad1f79 32:b1235080e694
42 def test_setting_unknown_fields(self): 42 def test_setting_unknown_fields(self):
43 status = Status(self.filename) 43 status = Status(self.filename)
44 self.assertRaises(AttributeError, 44 self.assertRaises(AttributeError,
45 setattr, status, "unknown_field", "some value") 45 setattr, status, "unknown_field", "some value")
46 46
47 def test_default_value(self): 47 def test_default_values(self):
48 status = Status(self.filename) 48 status = Status(self.filename)
49 self.assertEquals(status.status, "unknown")
49 self.assertEquals(status.start, None) 50 self.assertEquals(status.start, None)
51 self.assertEquals(status.stop, None)
50 52
51 def test_date(self): 53 def test_date(self):
52 timestamp = datetime(2007, 3, 9, 17, 32, 55) 54 timestamp = datetime(2007, 3, 9, 17, 32, 55)
53 status = Status(self.filename) 55 status = Status(self.filename)
54 status.start = timestamp 56 status.start = timestamp
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)