Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into django_2.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
znick committed Apr 4, 2024
2 parents e2f5068 + b6c07a4 commit 7d40b76
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion anytask/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
COURSES_WITH_CONTEST_MARKS = [11, 10, 65, 85, 93, 82, 79, 80, 104, 137, 160, 155, 237, 214, 202, 294, 307, 277]

# ALL_PAGES_MESSAGE = ""
ALL_PAGES_MESSAGE = """<div class="alert alert-warning">Технические работы! Anytask будет недоступен 31 марта, с 20 по 21 МСК.
ALL_PAGES_MESSAGE = """<div class="alert alert-warning">Технические работы! Anytask будет недоступен 4 апреля с 21 по 22 МСК.
Приносим извинения за неудобства.
</div>"""

Expand Down
12 changes: 11 additions & 1 deletion anytask/users/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_login_user__bad_email(self):

def test_register_user(self):
client = self.client

form_data = {"username": u"test_user1",
"email": u"[email protected]",
"first_name": u"Иван",
Expand All @@ -125,9 +125,19 @@ def test_register_user(self):

user.is_active = True
user.save()
self.assertEqual(user.username, "test_user1")
self.assertEqual(user.email, "[email protected]")
self.assertEqual(user.first_name, "Иван")
self.assertEqual(user.last_name, "Иванов")

self.assertTrue(client.login(username="test_user1", password="qwer1"))

user_profile = UserProfile.objects.get(user=user)

self.assertEqual(user_profile.show_email, True)

self.assertEqual(user_profile.is_active(), True)

def test_register_user__login_already_exists(self):
client = self.client

Expand Down

0 comments on commit 7d40b76

Please sign in to comment.