from django.test import TestCase
from django.urls import reverse
# Create your tests here.

class BrowseViewTests(TestCase):
    def test_index_view_with_no_courses(self):
        '''
            If no courses exist, an appropriate message should be displayed.
        '''
        response = self.client.get(reverse('browse:index'))
        self.assertEqual(response.status_code, 200)
        self.assertContains(response, 'No available course.')
        self.assertQuerysetEqual(response.context['courses'], [])

    # def test_index_view_with_future_question_and_past_question(self):
    #     """
    #     Even if both past and future questions exist, only past questions
    #     should be displayed.
    #     """
    #     create_question(question_text="Past question.", days=-30)
    #     create_question(question_text="Future question.", days=30)
    #     response = self.client.get(reverse('browse:index'))
    #     self.assertQuerysetEqual(
    #         response.context['courses'],
    #         ['<Course: Course object>']
    #     )

@@ -88,966 +88,4 @@
 re.%0A
-%0Aclass BrowseViewTests(TestCase):%0A    def test_index_view_with_no_courses(self):%0A        '''%0A            If no courses exist, an appropriate message should be displayed.%0A        '''%0A        response = self.client.get(reverse('browse:index'))%0A        self.assertEqual(response.status_code, 200)%0A        self.assertContains(response, 'No available course.')%0A        self.assertQuerysetEqual(response.context%5B'courses'%5D, %5B%5D)%0A%0A    # def test_index_view_with_future_question_and_past_question(self):%0A    #     %22%22%22%0A    #     Even if both past and future questions exist, only past questions%0A    #     should be displayed.%0A    #     %22%22%22%0A    #     create_question(question_text=%22Past question.%22, days=-30)%0A    #     create_question(question_text=%22Future question.%22, days=30)%0A    #     response = self.client.get(reverse('browse:index'))%0A    #     self.assertQuerysetEqual(%0A    #         response.context%5B'courses'%5D,%0A    #         %5B'%3CCourse: Course object%3E'%5D%0A    #     )%0A

Remove test