def test_core(self): """Check if core views return status code 200.""" views = [ ('index', {}), ('stats', {}), ('gallery', {}), ('status', {}), ] # Empty. self.check_list('core', views) # Board only. board = self.add_model(models.Board, name='board') params = {'board': board.name} views.extend([ ('board', params), ('board_stats', params), ('board_gallery', params), ]) self.check_list('core', views) # Board and empty thread. thread = self.add_model(models.Thread, board=board, number=1, first_reply=utc_now(), last_reply=utc_now()) params = {'board': board.name, 'thread': thread.number} views.extend([ ('thread', params), ('thread_stats', params), ('thread_gallery', params), ]) self.check_list('core', views)
def test_utc_now(self): self.assertIsNotNone(helpers.utc_now().tzinfo)