def test_deletehints(self): """ Checks that delete_hints deletes the right stuff. """ request = RequestFactory() post = request.post(self.url, {"field": "hints", "op": "delete hints", 1: [self.problem_id, "1.0", "1"]}) view.delete_hints(post, self.course_id, "hints") problem_hints = XModuleContentField.objects.get(field_name="hints", definition_id=self.problem_id).value self.assertTrue("1" not in json.loads(problem_hints)["1.0"])
def test_deletehints(self): """ Checks that delete_hints deletes the right stuff. """ request = RequestFactory() post = request.post(self.url, {'field': 'hints', 'op': 'delete hints', 1: [self.problem_id.to_deprecated_string(), '1.0', '1']}) view.delete_hints(post, self.course_id, 'hints') problem_hints = XModuleUserStateSummaryField.objects.get(field_name='hints', usage_id=self.problem_id).value self.assertTrue('1' not in json.loads(problem_hints)['1.0'])
def test_deletehints(self): """ Checks that delete_hints deletes the right stuff. """ request = RequestFactory() post = request.post( self.url, {"field": "hints", "op": "delete hints", 1: [self.problem_id.to_deprecated_string(), "1.0", "1"]} ) view.delete_hints(post, self.course_id, "hints") problem_hints = XModuleUserStateSummaryField.objects.get(field_name="hints", usage_id=self.problem_id).value self.assertTrue("1" not in json.loads(problem_hints)["1.0"])
def test_deletehints(self): """ Checks that delete_hints deletes the right stuff. """ request = RequestFactory() post = request.post(self.url, {'field': 'hints', 'op': 'delete hints', 1: [self.problem_id, '1.0', '1']}) view.delete_hints(post, self.course_id, 'hints') problem_hints = XModuleContentField.objects.get(field_name='hints', definition_id=self.problem_id).value self.assertTrue('1' not in json.loads(problem_hints)['1.0'])