def test_valid_data(self):
    data = json.dumps({'title': 'Test Title', 'slug': 'test-title', 'content': 'This is the content', 'annotated': {'annotations': 'This is another annotations'}})
    resp = self.client.put('/api/v1/notes/1/', data=data, content_type='application/json')
    self.assertEqual(resp.status_code, 204)
    note = json.loads(self.client.get('/api/v1/notes/1/', content_type='application/json').content.decode('utf-8'))
    self.assertTrue(note['annotated'])
    self.assertEqual('test-title', note['slug'])
def test_valid_data(self):
    data = json.dumps({'title': 'Test Title', 'slug': 'test-title', 'content': 'This is the content', 'annotated': {'annotations': 'This is another annotations'}})
    resp = self.client.put('/api/v1/notes/1/', data=data, content_type='application/json')
    self.assertEqual(resp.status_code, 204)
    note = json.loads(self.client.get('/api/v1/notes/1/', content_type='application/json').content.decode('utf-8'))
    self.assertTrue(note['annotated'])
    self.assertEqual('test-title', note['slug'])