class IpadCommentTest(TestCase): def setUp(self): self.comment = IpadCommentFactory() def test_updated_at(self): then = timezone.now() # Upon saving, updated_at field is updated self.comment.save() assert_true(self.comment.updated_at > then) def test_get_cname(self): assert_equal(self.comment.get_cname(), "comment") def test_device_updated_at(self): then = timezone.now() self.comment.save() assert_true(self.comment.device.updated_at > then)
class IpadCommentTest(TestCase): def setUp(self): self.comment = IpadCommentFactory() def test_updated_at(self): then = timezone.now() # Upon saving, updated_at field is updated self.comment.save() assert_true(self.comment.updated_at > then) def test_get_cname(self): assert_equal(self.comment.get_cname(), 'comment') def test_device_updated_at(self): then = timezone.now() self.comment.save() assert_true(self.comment.device.updated_at > then)