Skip to content

Commit

Permalink
merge migrations and black/ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GDay committed Nov 10, 2023
1 parent fb4e111 commit 141a8e3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion back/admin/hardware/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _
Expand All @@ -6,7 +7,7 @@

from admin.hardware.forms import HardwareForm
from admin.hardware.models import Hardware
from users.mixins import LoginRequiredMixin, ManagerPermMixin
from users.mixins import ManagerPermMixin


class HardwareListView(LoginRequiredMixin, ManagerPermMixin, ListView):
Expand Down
6 changes: 4 additions & 2 deletions back/admin/settings/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@ def test_totp_views(client, admin_factory):
assert "Activate" in response.content.decode()
assert "TOTP 2FA" in response.content.decode()

with patch("allauth.account.decorators.did_recently_authenticate", Mock(return_value=True)):
with patch(
"allauth.account.decorators.did_recently_authenticate", Mock(return_value=True)
):
response = client.get(reverse("settings:mfa_activate_totp"))
assert "To protect your account with two-factor" in response.content.decode()

Expand All @@ -327,7 +329,7 @@ def test_totp_views(client, admin_factory):
{
"code": "123",
},
follow=True
follow=True,
)

url = reverse("settings:totp")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Generated by Django 4.2.5 on 2023-11-10 22:14

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("users", "0037_delete_otprecoverykey"),
("users", "0037_user_hardware"),
]

operations = []

0 comments on commit 141a8e3

Please sign in to comment.