Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Permission matching query in test flow #188

Closed
tschellenbach opened this Issue · 4 comments

3 participants

@tschellenbach

My testsuite is throwing Permission matching query errors at me.
I know I can run check_permissions on the main db, but that doesn't really help for the testing DB.
Test output:
http://travis-ci.org/#!/tschellenbach/Django-facebook/jobs/1189496

Do you have some tips for me?

BTW,
Love userena, recommending it with Django Facebook

@wunki
Owner

I wish I could help you with this, I remember that I tried to fix this a long time ago but gave up because I wasn't able to workout how Django defines which permissions should be added to the database. If you give it another try, I will help where I can. Currently to busy to debug this myself.

@StephenChan

how Django defines which permissions should be added to the database

wunki, if I'm reading correctly, the Django documentation on Permissions explains this. But looking at class UserenaBaseProfile in userena/models.py, it looks like you already know how that works, particularly adding custom permissions...

One thing to note though: Django adds the Permission objects upon a syncdb. So if you use django-south with an app, then Permission objects might not be added/updated for that app as you expect. See here and here for more details. I'm not sure if South is related to the issue here (and I'm not super experienced with Django unit testing myself), but it may be something to look out for.

@tschellenbach
@wunki
Owner

Hi Thierry,

Always nice to meet fellow developers. Let me know when you are in Leiden, I will do the same when on my next visit to Amsterdam.

Till someday :)

@wunki wunki closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.