i'm trying to write tests for my view functions and i encounter a problem.
i want to check that a specific function return me a json of some kind, so i
wrote the following code:
client = Client()
response = client.get('/func/1/True')
self.assertRedirects(response, "login/?next=/func/1/True", 302)
when the view function is:
@login_required
def func(request, objId, flag):
return json.dumps(something)
but when i run the tests i get a failed from the assert:
ValueError: The file 'myApp/css/bootstrap.css' could not be found with
<whitenoise.django.GzipManifestStaticFilesStorage object at 0x0000000004C7A898>.
but when i run the app without tests it works find and finds the file.
note: i run the tests from eclipse (in case it makes a different...)
any ideas why it happen?
Aucun commentaire:
Enregistrer un commentaire