Ejemplo n.º 1
0
    def test_8_get_detail_closing_time(self):
        hearing = Hearing()
        hearing.save()

        response = self.client.get(self.get_detail_url(hearing.id))
        assert response.status_code is 200

        data = self.get_data_from_response(response)

        assert 'results' not in data
        assert_datetime_fuzzy_equal(data['close_at'], hearing.close_at)
Ejemplo n.º 2
0
    def test_54_list_all_comments_added_to_hearing_check_created_at(self, default_hearing):
        self.user_login()
        self.create_default_comments(default_hearing)

        # list all comments
        response = self.client.get(self.get_hearing_detail_url(default_hearing.id, 'comments'))
        assert response.status_code == 200

        data = self.get_data_from_response(response)
        for comment in data:
            assert_datetime_fuzzy_equal(now(), comment['created_at'])