예제 #1
0
 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)
예제 #2
0
 def test_index(self):
     tester = app.test_client(self)
     response = tester.get('/', content_type='html/text')
     self.assertEqual(response.status_code, 200)
예제 #3
0
 def test_delete(self):
     tester = app.test_client(self)
     response = tester.delete('/medias/1', content_type='html/text')
     self.assertEqual(response.status_code, 200)