def test_invalid_data(self):
    data = json.dumps({'objects': [{'id': 1, 'title': 'Test Title', 'slug': 'test-title', 'annotated': {'annotations': None}, 'user': {'id': 1}}, {'id': 2, 'title': 'Test Title', 'annotated': {'annotations': None}, 'user': {'id': 1}}]})
    resp = self.client.put('/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': {'content': ['This field is required.']}, 'annotated': {'annotations': ['This field is required.']}})
def test_invalid_data(self):
    data = json.dumps({'objects': [{'id': 1, 'title': 'Test Title', 'slug': 'test-title', 'annotated': {'annotations': None}, 'user': {'id': 1}}, {'id': 2, 'title': 'Test Title', 'annotated': {'annotations': None}, 'user': {'id': 1}}]})
    resp = self.client.put('/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': {'content': ['This field is required.']}, 'annotated': {'annotations': ['This field is required.']}})