Commits

Anonymous committed 39f67fd

add messages to tests

Comments (0)

Files changed (1)

 import test_settings
 
+from datetime import datetime
+
 from flaskext.testing import TestCase
 
 from irc_reader import create_app
-from irc_reader.models import db, Channel
+from irc_reader.models import db, Channel, Message
 
 class TestViews(TestCase):
     
     def create_models(self):
         self.channel = Channel(name=u"pocoo")
         db.session.add(self.channel)
+        now = datetime.now()
+
+        for i in xrange(200):
+            message = Message(channel=self.channel,
+                              date=now,
+                              nick="tester",
+                              message="testing")
+
+            db.session.add(message)
+
+    
         db.session.commit()
 
     def test_index(self):