aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_api.py
diff options
context:
space:
mode:
authortilly-Q <nattilypigeonfowl@gmail.com>2013-08-20 12:02:20 -0400
committertilly-Q <nattilypigeonfowl@gmail.com>2013-08-20 12:02:20 -0400
commite1561d048815e29b3b7c7e1c860d9cf0c4326f0a (patch)
tree691fe54e5b6a1dcb6799d673a99f01e850a6a9f9 /mediagoblin/tests/test_api.py
parent8394febbe1408030d1afa8f3961d92341eefa474 (diff)
downloadmediagoblin-e1561d048815e29b3b7c7e1c860d9cf0c4326f0a.tar.lz
mediagoblin-e1561d048815e29b3b7c7e1c860d9cf0c4326f0a.tar.xz
mediagoblin-e1561d048815e29b3b7c7e1c860d9cf0c4326f0a.zip
This was a very small update, I'm hoping to rebase after this to solve some
other problems. I started looking at the tests in this update. This update I spent fixing the tests to work with my new code. --\ mediagoblin/db/migration_tools.py --| Merging from ticket 679 --\ mediagoblin/db/migrations.py --| Added unique constraint to Privilege.privilege_name --\ mediagoblin/db/models.py --| Deleted vestigial Privilege.is_admin_or_moderator method --\ mediagoblin/templates/mediagoblin/moderation/user.html --| Add a `Ban User` / `UnBan User` for admin --\ mediagoblin/test/test_api.py --| Fixed test with my new changes --\ mediagoblin/test/test_auth.py --| Try to fix test, still having problems --\ mediagoblin/test/test_modelmethods.py --| Wrote my first test for the User.has_privilege method --\ mediagoblin/test/test_modelmethods.py --| Fixed test with my new changes --\ mediagoblin/test/test_sqlmigrations.py --| Merging from ticket 679 --\ mediagoblin/test/tools.py --| Editted add_fixture_user to allow for privileges rather than active column
Diffstat (limited to 'mediagoblin/tests/test_api.py')
-rw-r--r--mediagoblin/tests/test_api.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mediagoblin/tests/test_api.py b/mediagoblin/tests/test_api.py
index 89cf1026..eb9c0fd4 100644
--- a/mediagoblin/tests/test_api.py
+++ b/mediagoblin/tests/test_api.py
@@ -25,6 +25,7 @@ from mediagoblin.tools import template, pluginapi
from mediagoblin.tests.tools import fixture_add_user
from .resources import GOOD_JPG, GOOD_PNG, EVIL_FILE, EVIL_JPG, EVIL_PNG, \
BIG_BLUE
+from mediagoblin.db.models import Privilege
_log = logging.getLogger(__name__)
@@ -35,7 +36,8 @@ class TestAPI(object):
self.db = mg_globals.database
self.user_password = u'4cc355_70k3N'
- self.user = fixture_add_user(u'joapi', self.user_password)
+ self.user = fixture_add_user(u'joapi', self.user_password,
+ privileges=[u'active',u'uploader'])
def login(self, test_app):
test_app.post(