-
-
Notifications
You must be signed in to change notification settings - Fork 966
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
89 additions
and
16 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
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
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,11 @@ | ||
{% load i18n %} | ||
{% load settings %} | ||
|
||
{% if user.profile.has_exceeded_quota_cached %} | ||
{% with total=user.profile.quota|disk_size used=user.profile.used_quota_cached|disk_size %} | ||
{% quota_exceeded_grace_period as when %} | ||
<div class="alert alert-warning alert-dismissible"> | ||
<i class="fas fa-info-circle"></i> {% blocktrans %}The disk quota is being exceeded ({{ used }} of {{ total }} used). The most recent tasks will be automatically deleted {{ when }}, until usage falls below {{ total }}.{% endblocktrans %} | ||
</div> | ||
{% endwith %} | ||
{% endif %} |
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
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,34 @@ | ||
import os | ||
from django.test import Client | ||
from webodm import settings | ||
from .classes import BootTestCase | ||
|
||
class TestLogin(BootTestCase): | ||
|
||
def setUp(self): | ||
pass | ||
|
||
def tearDown(self): | ||
pass | ||
|
||
def test_reset_password_render(self): | ||
c = Client() | ||
c.login(username="testuser", password="test1234") | ||
|
||
settings.RESET_PASSWORD_LINK = '' | ||
|
||
res = c.get('/login/', follow=True) | ||
body = res.content.decode("utf-8") | ||
|
||
# The reset password link should show instructions | ||
self.assertTrue("You can reset the administrator password" in body) | ||
|
||
settings.RESET_PASSWORD_LINK = 'http://0.0.0.0/reset_test' | ||
|
||
res = c.get('/login/', follow=True) | ||
body = res.content.decode("utf-8") | ||
|
||
# The reset password link should show instructions | ||
self.assertTrue('<a href="http://0.0.0.0/reset_test' in body) | ||
|
||
|
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