Skip to content

Commit

Permalink
Merge pull request #8561 from cfpb/fix/cdntools
Browse files Browse the repository at this point in the history
Fix `invalidate_page_cache` management command
  • Loading branch information
willbarton authored Sep 9, 2024
2 parents cbbddb1 + 514fbc0 commit 98ae0c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 1 addition & 5 deletions cfgov/cdntools/management/commands/invalidate_page_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 98ae0c7

Please sign in to comment.