The new strategy is to do a three phase migration. This is the first phase: getting the namespace user in the db and written for all new repositories.

This commit is contained in:
Jake Moshenko 2014-09-22 17:27:02 -04:00
parent 8626d1cd70
commit 3259cda000
7 changed files with 62 additions and 74 deletions

View file

@ -5,6 +5,7 @@ from urllib import urlencode
from urlparse import urlparse, urlunparse, parse_qs
from app import app
from data import model
from initdb import setup_database_for_testing, finished_database_for_testing
from endpoints.api import api_bp, api
@ -75,7 +76,8 @@ class ApiTestCase(unittest.TestCase):
with client.session_transaction() as sess:
if auth_username:
sess['user_id'] = auth_username
loaded = model.get_user(auth_username)
sess['user_id'] = loaded.id
sess[CSRF_TOKEN_KEY] = CSRF_TOKEN
# Restore the teardown functions