Show More
@@ -45,7 +45,7 b' def testuser_api(request, pylonsapp):' | |||
|
45 | 45 | # create TOKEN for user, if he doesn't have one |
|
46 | 46 | if not cls.test_user.api_key: |
|
47 | 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 | 50 | Session().commit() |
|
51 | 51 | cls.TEST_USER_LOGIN = cls.test_user.username |
@@ -575,7 +575,7 b' class DbManage(object):' | |||
|
575 | 575 | strict_creation_check=True, api_key=None): |
|
576 | 576 | log.info('creating user %s' % username) |
|
577 | 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 | 579 | active=True, admin=admin, extern_type="rhodecode", |
|
580 | 580 | strict_creation_check=strict_creation_check) |
|
581 | 581 | |
@@ -583,7 +583,7 b' class DbManage(object):' | |||
|
583 | 583 | log.info('setting a provided api key for the user %s', username) |
|
584 | 584 | from rhodecode.model.auth_token import AuthTokenModel |
|
585 | 585 | AuthTokenModel().create( |
|
586 | user=user, description='BUILTIN TOKEN') | |
|
586 | user=user, description=u'BUILTIN TOKEN') | |
|
587 | 587 | |
|
588 | 588 | def create_default_user(self): |
|
589 | 589 | log.info('creating default user') |
@@ -591,8 +591,8 b' class DbManage(object):' | |||
|
591 | 591 | user = UserModel().create_or_update(username=User.DEFAULT_USER, |
|
592 | 592 | password=str(uuid.uuid1())[:20], |
|
593 | 593 | email=User.DEFAULT_USER_EMAIL, |
|
594 | firstname='Anonymous', | |
|
595 | lastname='User', | |
|
594 | firstname=u'Anonymous', | |
|
595 | lastname=u'User', | |
|
596 | 596 | strict_creation_check=False) |
|
597 | 597 | # based on configuration options activate/deactive this user which |
|
598 | 598 | # controlls anonymous access |
@@ -370,7 +370,7 b' class UserModel(BaseModel):' | |||
|
370 | 370 | if not edit: |
|
371 | 371 | # add the RSS token |
|
372 | 372 | AuthTokenModel().create(username, |
|
373 | description='Generated feed token', | |
|
373 | description=u'Generated feed token', | |
|
374 | 374 | role=AuthTokenModel.cls.ROLE_FEED) |
|
375 | 375 | kwargs = new_user.get_dict() |
|
376 | 376 | # backward compat, require api_keys present |
General Comments 0
You need to be logged in to leave comments.
Login now