-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from ar4s/feat/issue-69--custom-admin-path
feat: custom path to Django admin
- Loading branch information
Showing
6 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: tests | ||
on: [pull_request, push] | ||
env: | ||
DATABASE_URL: sqlite:///cardie/db.sqlite3 | ||
jobs: | ||
test_project: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- run: pip install -r requirements.txt | ||
- run: pip install -r requirements-dev.txt | ||
- run: python cardie/manage.py test cardie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from unittest import skip | ||
|
||
from django.test import Client, TestCase, override_settings | ||
|
||
|
||
@override_settings(ADMIN_PATH="foo/") | ||
class AdminTestCase(TestCase): | ||
fixtures = ["server"] | ||
|
||
def setUp(self): | ||
self.client = Client() | ||
|
||
def test_default_path_should_be_admin(self): | ||
response = self.client.get("/admin/", follow=True) | ||
self.assertEqual(response.status_code, 200) | ||
|
||
@skip("This test is failing. Is hard to test this because urls are populated.") | ||
@override_settings(ADMIN_PATH="foo/") | ||
def test_custom_path_should_be_foo(self): | ||
response = self.client.get("/foo/", follow=True) | ||
self.assertEqual(response.status_code, 200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"model": "main.server", | ||
"pk": 1, | ||
"fields": { | ||
"ip": "127.0.0.1", | ||
"production": true, | ||
"allow_create_accounts": true, | ||
"allow_sign_in": true | ||
} | ||
} | ||
] |
This file was deleted.
Oops, something went wrong.