10 lines
409 B
Python
10 lines
409 B
Python
|
from mock import patch
|
||
|
|
||
|
from data.model.user import create_user_noverify
|
||
|
from test.fixtures import database_uri, init_db_path, sqlitedb_file
|
||
|
|
||
|
def test_create_user_with_expiration(database_uri):
|
||
|
with patch('data.model.config.app_config', {'DEFAULT_TAG_EXPIRATION': '1h'}):
|
||
|
user = create_user_noverify('foobar', 'foo@example.com', email_required=False)
|
||
|
assert user.removed_tag_expiration_s == 60 * 60
|