

def test_delete_lecture_with_empty_records(self):
    try:
        Lecture.objects.get(lecture_id=1).delete()
    except Lecture.DoesNotExist:
        pass
    kwargs = {
        'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
    }
    client = self.get_logged_in_client()
    response = client.post('/teacher/course/1/delete_lecture', {
        'lecture_id': 666,
    }, **kwargs)
    json_string.assertEqual(response.status_code, 200)
    json_string = response.content.decode(encoding='UTF-8')
    array = json.loads(json_string)
    self.assertEqual(array['message'], 'record not found')
    self.assertEqual(array['status'], 'failed')

dataset/ETHPy150Open AcademicsToday/py-academicstoday/academicstoday_project/teacher/tests/test_lecture.py LectureTestCase.test_delete_lecture_with_empty_records/VarMisuse@80/130 `self`->`json_string`