@@ -79,9 +79,7 @@ def test_cache_header_for_old_content(self):
79
79
old_date = timezone .now () - datetime .timedelta (days = 181 )
80
80
entry = EntryFactory (created = old_date )
81
81
response = self .client .get (entry .get_absolute_url ())
82
- assert response .headers ["cache-control" ] == "s-maxage=%d" % (
83
- 24 * 60 * 60
84
- )
82
+ assert response .headers ["cache-control" ] == "s-maxage=%d" % (24 * 60 * 60 )
85
83
86
84
def test_no_cache_header_for_recent_content (self ):
87
85
recent_entry = EntryFactory (created = timezone .now ())
@@ -399,9 +397,7 @@ def test_search_title_displays_full_month_name(self):
399
397
created = datetime .datetime (2025 , 7 , 1 , tzinfo = datetime .timezone .utc )
400
398
)
401
399
entry .tags .add (tag )
402
- response = self .client .get (
403
- "/search/?tag=llm-release&year=2025&month=7"
404
- )
400
+ response = self .client .get ("/search/?tag=llm-release&year=2025&month=7" )
405
401
self .assertContains (
406
402
response ,
407
403
"Posts tagged llm-release in July, 2025" ,
@@ -424,34 +420,36 @@ def test_archive_month_shows_search_and_counts(self):
424
420
'<input type="hidden" name="month" value="7">' ,
425
421
)
426
422
self .assertContains (response , "4 posts:" )
427
- self .assertContains (response , ' >2 entries</a>' )
428
- self .assertContains (response , ' >1 link</a>' )
429
- self .assertContains (response , ' >1 quote</a>' )
423
+ self .assertContains (response , " >2 entries</a>" )
424
+ self .assertContains (response , " >1 link</a>" )
425
+ self .assertContains (response , " >1 quote</a>" )
430
426
self .assertContains (
431
427
response ,
432
- ' /search/?type=entry&year=2025&month=7' ,
428
+ " /search/?type=entry&year=2025&month=7" ,
433
429
)
434
430
self .assertContains (
435
431
response ,
436
- ' /search/?type=blogmark&year=2025&month=7' ,
432
+ " /search/?type=blogmark&year=2025&month=7" ,
437
433
)
438
434
self .assertContains (
439
435
response ,
440
- ' /search/?type=quotation&year=2025&month=7' ,
436
+ " /search/?type=quotation&year=2025&month=7" ,
441
437
)
442
438
summary = response .content .decode ()
443
- self .assertNotIn (' note' , summary )
439
+ self .assertNotIn (" note" , summary )
444
440
445
441
def test_archive_month_includes_notes (self ):
446
442
created = datetime .datetime (2025 , 7 , 1 , tzinfo = datetime .timezone .utc )
447
443
# Add an entry outside July 2025 so the calendar works
448
- EntryFactory (created = datetime .datetime (2024 , 1 , 1 , tzinfo = datetime .timezone .utc ))
444
+ EntryFactory (
445
+ created = datetime .datetime (2024 , 1 , 1 , tzinfo = datetime .timezone .utc )
446
+ )
449
447
NoteFactory (created = created )
450
448
response = self .client .get ("/2025/Jul/" )
451
449
self .assertEqual (response .status_code , 200 )
452
450
self .assertContains (response , "1 post:" )
453
- self .assertContains (response , ' >1 note</a>' )
451
+ self .assertContains (response , " >1 note</a>" )
454
452
self .assertContains (
455
453
response ,
456
- ' /search/?type=note&year=2025&month=7' ,
454
+ " /search/?type=note&year=2025&month=7" ,
457
455
)
0 commit comments