def test_invalid_data(self):
    data = json.dumps({'title': '', 'slug': 'test-title', 'content': 'This is the content', 'user': {'pk': 1}, 'annotated': {'annotations': ''}})
    resp = self.client.post('/api/v1/notes/', data=data, content_type='application/json')
    self.assertEqual(resp.status_code, 400)
    self.assertEqual(json.loads(resp.content.decode('utf-8')), {'notes': {'title': ['This field is required.']}, 'annotated': {'annotations': ['This field is required.']}})
def test_invalid_data(self):
    data = json.dumps({'title': , 'slug': 'test-title', 'content': 'This is the content', 'user': {'pk': 1}, 'annotated': {'annotations': }})
    resp = self.client.post('/api/v1/notes/', data=data, content_type='application/json')
    self.assertEqual(resp.status_code, 400)
    self.assertEqual(json.loads(resp.content.decode('utf-8')), {'notes': {'title': ['This field is required.']}, 'annotated': {'annotations': ['This field is required.']}})