from mock import patch from data.model.user import create_user_noverify from test.fixtures import * def test_create_user_with_expiration(initialized_db): 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