From b7019bddff4e23617f64532b94348fa2fdd15863 Mon Sep 17 00:00:00 2001 From: Nimisha Asthagiri Date: Mon, 19 Aug 2019 10:50:23 -0400 Subject: [PATCH] CourseInfoTestCase fixes for "a bytes-like object is required, not 'str'" --- lms/djangoapps/courseware/tests/test_course_info.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/courseware/tests/test_course_info.py b/lms/djangoapps/courseware/tests/test_course_info.py index 414cf5b374..bce8c8b800 100644 --- a/lms/djangoapps/courseware/tests/test_course_info.py +++ b/lms/djangoapps/courseware/tests/test_course_info.py @@ -62,14 +62,14 @@ class CourseInfoTestCase(EnterpriseTestConsentRequired, LoginEnrollmentTestCase, url = reverse('info', args=[text_type(self.course.id)]) resp = self.client.get(url) self.assertEqual(resp.status_code, 200) - self.assertIn("OOGIE BLOOGIE", resp.content) - self.assertIn("You are not currently enrolled in this course", resp.content) + self.assertIn(b"OOGIE BLOOGIE", resp.content) + self.assertIn(b"You are not currently enrolled in this course", resp.content) def test_logged_in_enrolled(self): self.enroll(self.course) url = reverse('info', args=[text_type(self.course.id)]) resp = self.client.get(url) - self.assertNotIn("You are not currently enrolled in this course", resp.content) + self.assertNotIn(b"You are not currently enrolled in this course", resp.content) # TODO: LEARNER-611: If this is only tested under Course Info, does this need to move? @mock.patch('openedx.features.enterprise_support.api.enterprise_customer_for_request') @@ -93,7 +93,7 @@ class CourseInfoTestCase(EnterpriseTestConsentRequired, LoginEnrollmentTestCase, url = reverse('info', args=[text_type(self.course.id)]) resp = self.client.get(url) self.assertEqual(resp.status_code, 200) - self.assertNotIn("OOGIE BLOOGIE", resp.content) + self.assertNotIn(b"OOGIE BLOOGIE", resp.content) def test_logged_in_not_enrolled(self): self.setup_user()