mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
Send confirmation emails on register and add button to resend email (#298)
* Fixes #293 * Adding get_config/set_config test
This commit is contained in:
@@ -3,10 +3,20 @@
|
||||
|
||||
from tests.helpers import *
|
||||
from CTFd.models import ip2long, long2ip
|
||||
from CTFd.utils import override_template
|
||||
from CTFd.utils import get_config, set_config, override_template
|
||||
import json
|
||||
|
||||
|
||||
def test_get_config_and_set_config():
|
||||
"""Does get_config and set_config work properly"""
|
||||
app = create_ctfd()
|
||||
with app.app_context():
|
||||
assert get_config('setup') == True
|
||||
config = set_config('TEST_CONFIG_ENTRY', 'test_config_entry')
|
||||
assert config.value == 'test_config_entry'
|
||||
assert get_config('TEST_CONFIG_ENTRY') == 'test_config_entry'
|
||||
|
||||
|
||||
def test_ip2long_ipv4():
|
||||
"""Does ip2long work properly for ipv4 addresses"""
|
||||
assert ip2long('127.0.0.1') == 2130706433
|
||||
|
||||
Reference in New Issue
Block a user