Example #1
0
 def test_reports_for_hootboardgame(self):
     stats = ReportStats()
     stats.inc_msgs()
     self.assertEqual(stats.json(), {'threads': '0', 'msgs': '1', 'blogs': '0'})
     stats.inc_threads()
     stats.inc_threads()
     self.assertEqual(stats.json(), {'threads': '2', 'msgs': '1', 'blogs': '0'})
Example #2
0
 def test_blog_increment(self):
     stats = ReportStats()
     stats.inc_blogs()
     self.assertEqual(stats.json(), {'threads': '0', 'msgs': '0', 'blogs': '1'})
     stats.inc_blogs(2)
     self.assertEqual(stats.json(), {'threads': '0', 'msgs': '0', 'blogs': '3'})
Example #3
0
 def test_json(self):
     stats = ReportStats()
     result = stats.json()
     self.assertEqual(result, {'threads':'0', 'msgs':'0', 'blogs':'0'})