Esempio n. 1
0
 def test_is_course_run_in_a_program_failure(self, mock_get_programs):
     mock_get_programs.return_value = self.data
     course_run2 = CourseRunFactory()
     self.assertFalse(is_course_run_in_a_program(course_run2['key']))
Esempio n. 2
0
 def test_is_course_run_in_a_program_success(self, mock_get_programs):
     mock_get_programs.return_value = self.data
     self.assertTrue(is_course_run_in_a_program(self.course_run['key']))
     self.assertEqual(mock_get_programs.call_args[0], (self.site, ))
Esempio n. 3
0
 def test_is_course_run_in_a_program_failure(self, mock_get_programs):
     mock_get_programs.return_value = self.data
     course_run2 = CourseRunFactory()
     self.assertFalse(is_course_run_in_a_program(course_run2['key']))
Esempio n. 4
0
 def test_is_course_run_in_a_program_success(self, mock_get_programs):
     mock_get_programs.return_value = self.data
     assert is_course_run_in_a_program(self.course_run['key'])
     assert mock_get_programs.call_args[0] == (self.site, )
Esempio n. 5
0
 def test_is_course_run_in_a_program_success(self, mock_get_programs):
     mock_get_programs.return_value = self.data
     self.assertTrue(is_course_run_in_a_program(self.course_run['key']))
     self.assertEqual(mock_get_programs.call_args[0], (self.site,))