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)
def test_import_model(self): train_augment.run(num_epochs=1, device="cpu") import_model.run()
def test_train_augment(self): train_augment.run(num_epochs=1, device="cpu")
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)
def run(): download.run() import_data.run() train_augment.run() upload.run()