Client testing with custom http request referrer
I am writing an application that tracks URLs and stores different information about them (ie URL, referrer, user agent, etc...). Currently I am writing unit tests for it and I need to be able to spoof the referrer to test functionality (I only want to log specific referrers). Is there anyway I can set the referrer to lets say "google.com"? I am using the Django test client: from django.test.client import Client I need to access the correct test view which is why I'm not using any urllib libraries. If anyone know how to do this and could impart your great knowledge it would be much appreciated. Thanks! Rob P --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Custom Referrer for Unit Tests?
I am writing an application that tracks URLs and stores different information about them (ie URL, referrer, user agent, etc...). Currently I am writing unit tests for it and I need to be able to spoof the referrer to test functionality (I only want to log specific referrers). Is there anyway I can set the referrer to lets say "google.com"? I am using the Django test client: from django.test.client import Client I need to access the correct test view which is why I'm not using any urllib libraries. If anyone know how to do this and could impart your great knowledge it would be much appreciated. Thanks! Rob P --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---