Exemple #1
0
 def test_get_all_entries(self):
     expected = ("My Title", "My Text")
     with self.app.test_request_context('/'):
         microblog.write_entry(*expected)
         entries = microblog.get_all_entries()
         self.assertEquals(len(entries), 1)
         for entry in entries:
             self.assertEquals(expected[0], entry['title'])
             self.assertEquals(expected[1], entry['text'])
 def test_get_all_entries(self):
     expected = ("My Title", "My Text")
     with self.app.test_request_context('/'):
         microblog.write_entry(*expected)
         entries = microblog.get_all_entries()
         self.assertEquals(len(entries), 1)
         for entry in entries:
             self.assertEquals(expected[0], entry['title'])
             self.assertEquals(expected[1], entry['text'])
Exemple #3
0
 def test_get_all_entries_empty(self):
     with self.app.test_request_context('/'):
         entries = microblog.get_all_entries()
         self.assertEquals(len(entries), 0)
 def test_get_all_entries_empty(self):
     with self.app.test_request_context('/'):
         entries = microblog.get_all_entries()
         self.assertEquals(len(entries), 0)