diff options
author | Jessica Tallon <tsyesika@tsyesika.se> | 2015-07-17 17:51:51 +0200 |
---|---|---|
committer | Jessica Tallon <tsyesika@tsyesika.se> | 2015-07-31 15:15:24 +0200 |
commit | d88fcb03e2e520da6a7d0203d660e4536108f56b (patch) | |
tree | 75b751fae15a037301bb384e64eba13746cb57a6 /mediagoblin/tests/test_reporting.py | |
parent | 283e6d8b9f09341e3b97418b79f389bfdfee6498 (diff) | |
download | mediagoblin-d88fcb03e2e520da6a7d0203d660e4536108f56b.tar.lz mediagoblin-d88fcb03e2e520da6a7d0203d660e4536108f56b.tar.xz mediagoblin-d88fcb03e2e520da6a7d0203d660e4536108f56b.zip |
Change codebase to query or create correct User model
The code base had many references to User.username and other
specific to LocalUser attributes as that was the way it use to exist.
This updates those to query on the generic User model but filtering
by attributes on the LocalUser.
Diffstat (limited to 'mediagoblin/tests/test_reporting.py')
-rw-r--r-- | mediagoblin/tests/test_reporting.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/tests/test_reporting.py b/mediagoblin/tests/test_reporting.py index 6a9fe205..8b7f6559 100644 --- a/mediagoblin/tests/test_reporting.py +++ b/mediagoblin/tests/test_reporting.py @@ -20,7 +20,7 @@ import six from mediagoblin.tools import template from mediagoblin.tests.tools import (fixture_add_user, fixture_media_entry, fixture_add_comment, fixture_add_comment_report) -from mediagoblin.db.models import (MediaReport, CommentReport, User, +from mediagoblin.db.models import (MediaReport, CommentReport, User, LocalUser MediaComment) @@ -56,8 +56,8 @@ class TestReportFiling: return response, context_data def query_for_users(self): - return (User.query.filter(User.username==u'allie').first(), - User.query.filter(User.username==u'natalie').first()) + return (User.query.filter(LocalUser.username==u'allie').first(), + User.query.filter(LocalUser.username==u'natalie').first()) def testMediaReports(self): self.login(u'allie') |