def test_invalid_template(self):
        data = self.get_valid_data()
        data['content'] = '{% now %}'
        response = self.client.post(self.url, data=data)
        self.assertEqual(response.status_code, 200)
        results = json.loads(response.content.decode('utf-8'))
        self.assertFalse(results['valid'])
        scribble = Scribble.objects.get(pk=self.scribble.pk)
        self.assertNotEqual(scribble.content, data['content'])
Data should not be saved if the template is invalid.
dataset/ETHPy150Open caktus/django-scribbler/scribbler/tests/test_views.py/EditTestCase.test_invalid_template