Skip to content

Commit 225efd7

Browse files
author
Bogdan Peter
committed
black format
Signed-off-by: Bogdan Peter <[email protected]>
1 parent c31617b commit 225efd7

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

dkron/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '1.1.3'
1+
__version__ = '1.2.0'
22

33
# set default_app_config when using django earlier than 3.2
44
try:

testapp/testapp/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
1. Import the include() function: from django.urls import include, path
1414
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
1515
"""
16+
1617
from django.contrib import admin
1718
from django.urls import path, include
1819

testapp/tests/test_generic.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,18 @@ def test_sync_job(self, job_prefix=''):
182182
self.assertEqual(exc.exception.message, 'Whatever')
183183

184184
def test_job_form(self, job_prefix=''):
185-
form_data = {
186-
'name':'job1', 'schedule': '* 0 1 * * *', 'command': 'echo test'
187-
}
185+
form_data = {'name': 'job1', 'schedule': '* 0 1 * * *', 'command': 'echo test'}
188186
form = JobForm(data=form_data)
189187
self.assertEqual(form.is_valid(), False)
190-
self.assertEquals(form.errors['schedule'], ["Job schedule cannot start with * as this will schedule a job to start every second and can have unintended consequences."])
188+
self.assertEquals(
189+
form.errors['schedule'],
190+
[
191+
"Job schedule cannot start with * as this will schedule a job to start every second and can have unintended consequences."
192+
],
193+
)
194+
form_data = {'name': 'job1', 'schedule': '0 0 1 * * *', 'command': 'echo test', "retries": 0}
195+
form = JobForm(data=form_data)
196+
self.assertEqual(form.is_valid(), True)
191197

192198
def test_delete_job(self, job_prefix=''):
193199
j = models.Job.objects.create(name='job1')

0 commit comments

Comments
 (0)