mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
Switch default testing/development domain name to examplectf.com (#1807)
* Use `examplectf.com` as testing/development domain instead of `ctfd.io`
This commit is contained in:
@@ -78,12 +78,12 @@ def test_register_plugin_script():
|
||||
app = create_ctfd()
|
||||
with app.app_context():
|
||||
register_plugin_script("/fake/script/path.js")
|
||||
register_plugin_script("http://ctfd.io/fake/script/path.js")
|
||||
register_plugin_script("http://examplectf.com/fake/script/path.js")
|
||||
with app.test_client() as client:
|
||||
r = client.get("/")
|
||||
output = r.get_data(as_text=True)
|
||||
assert "/fake/script/path.js" in output
|
||||
assert "http://ctfd.io/fake/script/path.js" in output
|
||||
assert "http://examplectf.com/fake/script/path.js" in output
|
||||
destroy_ctfd(app)
|
||||
|
||||
|
||||
@@ -92,12 +92,12 @@ def test_register_plugin_stylesheet():
|
||||
app = create_ctfd()
|
||||
with app.app_context():
|
||||
register_plugin_script("/fake/stylesheet/path.css")
|
||||
register_plugin_script("http://ctfd.io/fake/stylesheet/path.css")
|
||||
register_plugin_script("http://examplectf.com/fake/stylesheet/path.css")
|
||||
with app.test_client() as client:
|
||||
r = client.get("/")
|
||||
output = r.get_data(as_text=True)
|
||||
assert "/fake/stylesheet/path.css" in output
|
||||
assert "http://ctfd.io/fake/stylesheet/path.css" in output
|
||||
assert "http://examplectf.com/fake/stylesheet/path.css" in output
|
||||
destroy_ctfd(app)
|
||||
|
||||
|
||||
@@ -106,12 +106,12 @@ def test_register_admin_plugin_script():
|
||||
app = create_ctfd()
|
||||
with app.app_context():
|
||||
register_admin_plugin_script("/fake/script/path.js")
|
||||
register_admin_plugin_script("http://ctfd.io/fake/script/path.js")
|
||||
register_admin_plugin_script("http://examplectf.com/fake/script/path.js")
|
||||
with login_as_user(app, name="admin") as client:
|
||||
r = client.get("/admin/statistics")
|
||||
output = r.get_data(as_text=True)
|
||||
assert "/fake/script/path.js" in output
|
||||
assert "http://ctfd.io/fake/script/path.js" in output
|
||||
assert "http://examplectf.com/fake/script/path.js" in output
|
||||
destroy_ctfd(app)
|
||||
|
||||
|
||||
@@ -120,12 +120,14 @@ def test_register_admin_plugin_stylesheet():
|
||||
app = create_ctfd()
|
||||
with app.app_context():
|
||||
register_admin_plugin_stylesheet("/fake/stylesheet/path.css")
|
||||
register_admin_plugin_stylesheet("http://ctfd.io/fake/stylesheet/path.css")
|
||||
register_admin_plugin_stylesheet(
|
||||
"http://examplectf.com/fake/stylesheet/path.css"
|
||||
)
|
||||
with login_as_user(app, name="admin") as client:
|
||||
r = client.get("/admin/statistics")
|
||||
output = r.get_data(as_text=True)
|
||||
assert "/fake/stylesheet/path.css" in output
|
||||
assert "http://ctfd.io/fake/stylesheet/path.css" in output
|
||||
assert "http://examplectf.com/fake/stylesheet/path.css" in output
|
||||
destroy_ctfd(app)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user