mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-23 19:22:27 +02:00
rename submodule properly
This commit is contained in:
parent
d12d6e7cdb
commit
a66aa6de80
@ -1,9 +1,7 @@
|
|||||||
import math
|
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
from allianceauth.framework.models import CronOffset # adjust path as needed
|
from allianceauth.crontab.models import CronOffset
|
||||||
from solo.models import SingletonModel
|
|
||||||
|
|
||||||
|
|
||||||
class CronOffsetModelTest(TestCase):
|
class CronOffsetModelTest(TestCase):
|
||||||
@ -25,7 +23,7 @@ class CronOffsetModelTest(TestCase):
|
|||||||
no explicit value is provided. We'll patch 'random.random' to
|
no explicit value is provided. We'll patch 'random.random' to
|
||||||
produce predictable output.
|
produce predictable output.
|
||||||
"""
|
"""
|
||||||
with patch('allianceauth.framework.models.random', return_value=0.1234):
|
with patch('allianceauth.crontab.models.random', return_value=0.1234):
|
||||||
# Force creation of a new CronOffset by clearing the existing one
|
# Force creation of a new CronOffset by clearing the existing one
|
||||||
CronOffset.objects.all().delete()
|
CronOffset.objects.all().delete()
|
||||||
|
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
# Generated by Django 4.2.16 on 2024-12-29 05:02
|
|
||||||
|
|
||||||
import allianceauth.framework.models
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
initial = True
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='CronOffset',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('minute', models.FloatField(default=allianceauth.framework.models.random_default, verbose_name='Minute Offset')),
|
|
||||||
('hour', models.FloatField(default=allianceauth.framework.models.random_default, verbose_name='Hour Offset')),
|
|
||||||
('day_of_month', models.FloatField(default=allianceauth.framework.models.random_default, verbose_name='Day of Month Offset')),
|
|
||||||
('month_of_year', models.FloatField(default=allianceauth.framework.models.random_default, verbose_name='Month Of Year Offset')),
|
|
||||||
('day_of_week', models.FloatField(default=allianceauth.framework.models.random_default, verbose_name='Day of Week Offset')),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'verbose_name': 'Cron Offsets',
|
|
||||||
},
|
|
||||||
),
|
|
||||||
]
|
|
Loading…
x
Reference in New Issue
Block a user