Commits

Frank Becker committed 4a79521

Added Test for presentation_timestamp

Comments (0)

Files changed (1)

src/submitter/tests/models.py

             show_type=1,
         )
         self.show_type1.save()
-        date_now = datetime.datetime.now()
 
         self.penta_show1 = PentaShow(
             title=u"Hacking is not a crime",
         self.news_entry1.tags = "Foo, Bar"
         self.news_entry1.categories.add(self.entry_category1,
                                         self.entry_category2)
+        self.date_now = datetime.datetime.now()
 
     def test_news_entry(self):
         "Test NewsEntry()"
         self.assertEquals(self.news_entry2.title, u"Alien8: Home")
 
 
+    def test_presented_date(self):
+        """Test if the presented attr was set correctly"""
+
+        self.news_entry1.presented_timestamp = self.date_now
+        self.news_entry1.save()
+        self.assertEqual(self.date_now, self.news_entry1.presented_timestamp)
+
+
 # vim: ts=4 et sw=4 fileencoding=utf-8 :