def test_put(self): tester = app.test_client(self) response = tester.put( '/medias/1', data=dict(name="Nice meme", url="https://www.youtube.com/watch?v=-mMhKYJFOnQ", duration=0.03, deleted=True), follow_redirects=True) self.assertEqual(response.status_code, 200)
def test_index(self): tester = app.test_client(self) response = tester.get('/', content_type='html/text') self.assertEqual(response.status_code, 200)
def test_delete(self): tester = app.test_client(self) response = tester.delete('/medias/1', content_type='html/text') self.assertEqual(response.status_code, 200)