Beispiel #1
0
 def test_upload_works_with_login(self):
     train_augment.run(num_epochs=1, device="cpu")
     json = get_upload_json('test_augment.pth')
     response = self.client.post('/api/model/',
                                 json,
                                 content_type='application/json',
                                 **self.auth_headers)
     self.assertEquals(response.status_code, status.HTTP_200_OK)
Beispiel #2
0
 def test_import_model(self):
     train_augment.run(num_epochs=1, device="cpu")
     import_model.run()
Beispiel #3
0
 def test_train_augment(self):
     train_augment.run(num_epochs=1, device="cpu")
Beispiel #4
0
 def test_upload_requires_login(self):
     train_augment.run(num_epochs=1, device="cpu")
     json = get_upload_json('test_augment.pth')
     response = self.client.post('/api/model/', json)
     self.assertEquals(response.status_code, status.HTTP_403_FORBIDDEN)
Beispiel #5
0
def run():
    download.run()
    import_data.run()
    train_augment.run()
    upload.run()