diff --git a/cfgov/cdntools/management/commands/invalidate_page_cache.py b/cfgov/cdntools/management/commands/invalidate_page_cache.py index af51003f6b..e133075841 100644 --- a/cfgov/cdntools/management/commands/invalidate_page_cache.py +++ b/cfgov/cdntools/management/commands/invalidate_page_cache.py @@ -19,9 +19,5 @@ def add_arguments(self, parser): def handle(self, *args, **options): batch = PurgeBatch() - batch.add_urls( - [ - options["url"], - ] - ) + batch.add_urls(options["url"]) batch.purge() diff --git a/cfgov/cdntools/tests/test_management_commands_invalidate_page_cache.py b/cfgov/cdntools/tests/test_management_commands_invalidate_page_cache.py index f2336fec7d..503ba624d1 100644 --- a/cfgov/cdntools/tests/test_management_commands_invalidate_page_cache.py +++ b/cfgov/cdntools/tests/test_management_commands_invalidate_page_cache.py @@ -13,5 +13,10 @@ ) class InvalidatePageTestCase(TestCase): def test_submission_with_url(self): - call_command("invalidate_page_cache", url="https://server/foo/bar") + call_command( + "invalidate_page_cache", + url=[ + "https://server/foo/bar", + ], + ) self.assertIn("https://server/foo/bar", MOCK_PURGED)