##// END OF EJS Templates
db: use unicode for some of the defaults to reduce sqlalchemy warnings.
marcink -
r1967:df3f2899 default
parent child Browse files
Show More
@@ -45,7 +45,7 b' def testuser_api(request, pylonsapp):'
45 # create TOKEN for user, if he doesn't have one
45 # create TOKEN for user, if he doesn't have one
46 if not cls.test_user.api_key:
46 if not cls.test_user.api_key:
47 AuthTokenModel().create(
47 AuthTokenModel().create(
48 user=cls.test_user, description='TEST_USER_TOKEN')
48 user=cls.test_user, description=u'TEST_USER_TOKEN')
49
49
50 Session().commit()
50 Session().commit()
51 cls.TEST_USER_LOGIN = cls.test_user.username
51 cls.TEST_USER_LOGIN = cls.test_user.username
@@ -575,7 +575,7 b' class DbManage(object):'
575 strict_creation_check=True, api_key=None):
575 strict_creation_check=True, api_key=None):
576 log.info('creating user %s' % username)
576 log.info('creating user %s' % username)
577 user = UserModel().create_or_update(
577 user = UserModel().create_or_update(
578 username, password, email, firstname='RhodeCode', lastname='Admin',
578 username, password, email, firstname=u'RhodeCode', lastname=u'Admin',
579 active=True, admin=admin, extern_type="rhodecode",
579 active=True, admin=admin, extern_type="rhodecode",
580 strict_creation_check=strict_creation_check)
580 strict_creation_check=strict_creation_check)
581
581
@@ -583,7 +583,7 b' class DbManage(object):'
583 log.info('setting a provided api key for the user %s', username)
583 log.info('setting a provided api key for the user %s', username)
584 from rhodecode.model.auth_token import AuthTokenModel
584 from rhodecode.model.auth_token import AuthTokenModel
585 AuthTokenModel().create(
585 AuthTokenModel().create(
586 user=user, description='BUILTIN TOKEN')
586 user=user, description=u'BUILTIN TOKEN')
587
587
588 def create_default_user(self):
588 def create_default_user(self):
589 log.info('creating default user')
589 log.info('creating default user')
@@ -591,8 +591,8 b' class DbManage(object):'
591 user = UserModel().create_or_update(username=User.DEFAULT_USER,
591 user = UserModel().create_or_update(username=User.DEFAULT_USER,
592 password=str(uuid.uuid1())[:20],
592 password=str(uuid.uuid1())[:20],
593 email=User.DEFAULT_USER_EMAIL,
593 email=User.DEFAULT_USER_EMAIL,
594 firstname='Anonymous',
594 firstname=u'Anonymous',
595 lastname='User',
595 lastname=u'User',
596 strict_creation_check=False)
596 strict_creation_check=False)
597 # based on configuration options activate/deactive this user which
597 # based on configuration options activate/deactive this user which
598 # controlls anonymous access
598 # controlls anonymous access
@@ -370,7 +370,7 b' class UserModel(BaseModel):'
370 if not edit:
370 if not edit:
371 # add the RSS token
371 # add the RSS token
372 AuthTokenModel().create(username,
372 AuthTokenModel().create(username,
373 description='Generated feed token',
373 description=u'Generated feed token',
374 role=AuthTokenModel.cls.ROLE_FEED)
374 role=AuthTokenModel.cls.ROLE_FEED)
375 kwargs = new_user.get_dict()
375 kwargs = new_user.get_dict()
376 # backward compat, require api_keys present
376 # backward compat, require api_keys present
@@ -264,7 +264,7 b' class Fixture(object):'
264
264
265 # create token for user
265 # create token for user
266 AuthTokenModel().create(
266 AuthTokenModel().create(
267 user=user, description='TEST_USER_TOKEN')
267 user=user, description=u'TEST_USER_TOKEN')
268
268
269 Session().commit()
269 Session().commit()
270 user = User.get_by_username(user.username)
270 user = User.get_by_username(user.username)
General Comments 0
You need to be logged in to leave comments. Login now