@@ -208,6 +208,7 @@ def test_edit_advisory(db, client):
208208 resp = client .post (url_for ('tracker.edit_advisory' , advisory_id = DEFAULT_ADVISORY_ID ), follow_redirects = True ,
209209 data = {'workaround' : workaround , 'impact' : impact })
210210 assert 200 == resp .status_code
211+ assert 'text/html; charset=utf-8' == resp .content_type
211212 assert_advisory_data (DEFAULT_ADVISORY_ID , workaround = workaround , impact = impact )
212213 assert 1 == advisory_count ()
213214
@@ -217,6 +218,7 @@ def test_edit_advisory_not_found(db, client):
217218 resp = client .post (url_for ('tracker.edit_advisory' , advisory_id = DEFAULT_ADVISORY_ID ), follow_redirects = True ,
218219 data = {'workaround' : 'nothing' , 'impact' : 'nothing' })
219220 assert resp .status_code == NotFound .code
221+ assert 'text/html; charset=utf-8' == resp .content_type
220222
221223
222224@create_package (name = 'foo' , version = '1.2.3-4' )
@@ -360,6 +362,7 @@ def test_advisory_atom(db, client):
360362def test_advisory_json_no_data (db , client ):
361363 resp = client .get (url_for ('tracker.advisory_json' , postfix = '/json' ), follow_redirects = True )
362364 assert 200 == resp .status_code
365+ assert 'application/json; charset=utf-8' == resp .content_type
363366 data = resp .get_json ()
364367 assert data == []
365368
@@ -370,6 +373,7 @@ def test_advisory_json_no_data(db, client):
370373def test_advisory_json (db , client ):
371374 resp = client .get (url_for ('tracker.advisory_json' , postfix = '/json' ), follow_redirects = True )
372375 assert 200 == resp .status_code
376+ assert 'application/json; charset=utf-8' == resp .content_type
373377 data = resp .get_json ()
374378 assert len (data ) == 1
375379 assert data [0 ]['name' ] == DEFAULT_ADVISORY_ID
@@ -400,6 +404,7 @@ def test_advisory_format_issue_listing_raw(db, client):
400404 advisory_id = DEFAULT_ADVISORY_ID ),
401405 follow_redirects = True )
402406 assert 200 == resp .status_code
407+ assert 'text/plain; charset=utf-8' == resp .content_type
403408 data = resp .data .decode ()
404409 assert 'CVE-ID : CVE-1111-1234 CVE-1111-12345 CVE-1234-11111 CVE-1234-11112\n ' + \
405410 ' CVE-1234-12345 CVE-1234-123456\n ' in data
@@ -466,6 +471,7 @@ def test_advisory_publish_advisory(db, client, patch_get):
466471def test_advisory_raw (db , client ):
467472 resp = client .get (url_for ('tracker.show_advisory_raw' , advisory_id = DEFAULT_ADVISORY_ID ), follow_redirects = True )
468473 assert 200 == resp .status_code
474+ assert 'text/plain; charset=utf-8' == resp .content_type
469475 data = resp .data .decode ()
470476 assert 'Arch Linux Security Advisory {}' .format (DEFAULT_ADVISORY_ID ) in data
471477
0 commit comments