Skip to content

Commit

Permalink
[req-changes] Fixed tests and formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
pandafy committed Aug 7, 2024
1 parent a4e3370 commit e62c108
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import openwisp_utils.fields

from .. import settings as app_settings


class Migration(migrations.Migration):
dependencies = [
Expand All @@ -16,7 +18,7 @@ class Migration(migrations.Migration):
name="sms_cooldown",
field=openwisp_utils.fields.FallbackPositiveIntegerField(
blank=True,
fallback=30,
fallback=app_settings.SMS_COOLDOWN,
help_text=(
"Time period a user will have to wait before"
" requesting another SMS token (in seconds)."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.11 on 2024-07-17 11:02
# Generated by Django 4.2.14 on 2024-08-07 16:38

from django.db import migrations

Expand Down Expand Up @@ -58,19 +58,4 @@ class Migration(migrations.Migration):
verbose_name="Password reset URL",
),
),
migrations.AlterField(
model_name="organizationradiussettings",
name="sms_cooldown",
field=openwisp_utils.fields.FallbackPositiveIntegerField(
blank=True,
default=None,
fallback=app_settings.SMS_COOLDOWN,
help_text=(
"Time period a user will have to wait before requesting"
" another SMS token (in seconds)."
),
null=True,
verbose_name="SMS Cooldown",
),
),
]
2 changes: 1 addition & 1 deletion openwisp_radius/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ def test_backward_compatible_default_password_reset_url(self):
# The default value is set on project startup, hence
# it also requires mocking.
OrganizationRadiusSettings._meta.get_field('password_reset_url'),
'default',
'fallback',
app_settings.DEFAULT_PASSWORD_RESET_URL,
):
response = self.client.get(url)
Expand Down

0 comments on commit e62c108

Please sign in to comment.