fix(api): align contracts with frontend md
Some checks failed
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 3m20s
CI/CD Pipeline / Run Tests (pull_request) Successful in 13m45s
CI/CD Pipeline / Run API Inventory E2E Tests (pull_request) Successful in 22s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped

This commit is contained in:
2026-03-23 13:12:10 +01:00
parent d030c705ac
commit 4ca6b75393
12 changed files with 215 additions and 215 deletions

View File

@@ -196,13 +196,9 @@ class ExchangeViewsTest(APITestCase):
def test_create_periodic_interval_task_success(self):
payload = {
"name": "exchange-copy-hourly",
"description": "Hourly sync",
"enabled": True,
"schedule_type": "interval",
"interval_every": 1,
"interval_period": "hours",
"mode": "all",
"notify_on_error": True,
}
@@ -219,11 +215,6 @@ class ExchangeViewsTest(APITestCase):
"schedule_type",
"interval_every",
"interval_period",
"crontab_minute",
"crontab_hour",
"crontab_day_of_week",
"crontab_day_of_month",
"crontab_month_of_year",
"notify_on_error",
},
)
@@ -292,15 +283,9 @@ class ExchangeViewsTest(APITestCase):
kwargs={"task_id": task.id},
)
payload = {
"schedule_type": "crontab",
"crontab_minute": "0",
"crontab_hour": "4",
"crontab_day_of_week": "*",
"crontab_day_of_month": "*",
"crontab_month_of_year": "*",
"mode": "single",
"table": "parsers_proxy",
"enabled": False,
"schedule_type": "daily",
"crontab_minute": 0,
"crontab_hour": 4,
"notify_on_error": True,
}
@@ -312,9 +297,9 @@ class ExchangeViewsTest(APITestCase):
self.assertIsNone(task.interval)
self.assertIsNotNone(task.crontab)
self.assertEqual(str(task.crontab.timezone), settings.TIME_ZONE)
self.assertFalse(task.enabled)
self.assertEqual(response.data["schedule_type"], "crontab")
self.assertEqual(response.data["crontab_hour"], "4")
self.assertTrue(task.enabled)
self.assertEqual(response.data["schedule_type"], "daily")
self.assertEqual(response.data["crontab_hour"], 4)
self.assertTrue(response.data["notify_on_error"])
self.assertFalse(IntervalSchedule.objects.filter(id=interval.id).exists())