lundi 16 octobre 2017

Is Django test Client can work with different domains?

Can i use Client for testing functional with, for example, different regional domains of project?

I try:

response = client.post(reverse('uri'), data={}, HTTP_HOST='domain1')
response = client.post(reverse('uri'), data={}, HTTP_HOST='domain2')

And i expected, that Client get different cookies for different domains, but in fact client get single cookie.

Is any way to get different cookies in this case? Or only way use CI with silenium?

Aucun commentaire:

Enregistrer un commentaire