My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 95: Django unit test - Url testing
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by Pradnya....@gmail.com, Jul 14, 2010
I am want to write django 1.1 test case on fedora 12 x86_64.
To test the url I want to session to be persistent so that the next
test can use the same context. I can use client.login() method becoz
in the application login is rewritten.

If I directly use
kwargs = {'HTTP_X_REQUESTED_WITH':'XMLHttpRequest'}
response = self.client.post('/login/', {'username': 't...@test.com',
'password': 'test01', 'domain':'demo1'}, **kwargs)
This works fine but I am not able to test the next url. It's trowing
following error
WARNING:root:Caught an exception while processing permission:
{'content': 'MSHTML', 'name': 'GENERATOR', 'group_name': ''}
ERROR:root:Permission matching query does not exist.
Traceback (most recent call last):
  File "/home/sungard/Portals/trunk/django/portal/../portal/auth.py",
line 143, in authenticate
    perm = Permission.objects.get(codename = codename)
  File "/usr/lib/python2.6/site-packages/django/db/models/manager.py",
line 120, in get
    return self.get_query_set().get(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/django/db/models/query.py",
line 305, in get
    % self.model._meta.object_name)
DoesNotExist: Permission matching query does not exist.

Please suggest. 

Aug 7, 2013
#1 kr.krist...@gmail.com
You can search on Google with this issue google give good result regarding want to develop application one of good company for Django development that is  LeoTechnoSoft.net

Powered by Google Project Hosting