Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprengere committed Apr 16, 2023
1 parent 4493c13 commit 0abb794
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Within your Flask application's settings you can provide the following settings

| Option | Description | Default |
| ------ | ----------- | ------- |
| `COMPRESS_MIMETYPES` | Set the list of mimetypes to compress here. | `[`<br>`'application/javascript'`<br>`'application/json',`<br>`'text/css',`<br>`'text/html',`<br>`'text/javascript'`<br>`'text/xml'`<br>`]` |
| `COMPRESS_MIMETYPES` | Set the list of mimetypes to compress here. | `[`<br>`'application/javascript',`<br>`'application/json',`<br>`'text/css',`<br>`'text/html',`<br>`'text/javascript',`<br>`'text/xml',`<br>`]` |
| `COMPRESS_LEVEL` | Specifies the gzip compression level. | `6` |
| `COMPRESS_BR_LEVEL` | Specifies the Brotli compression level. Ranges from 0 to 11. | `4` |
| `COMPRESS_BR_MODE` | For Brotli, the compression mode. The options are 0, 1, or 2. These correspond to "generic", "text" (for UTF-8 input), and "font" (for WOFF 2.0). | `0` |
Expand Down
10 changes: 8 additions & 2 deletions tests/test_flask_compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ def setUp(self):

def test_mimetypes_default(self):
""" Tests COMPRESS_MIMETYPES default value is correctly set. """
defaults = ['text/html', 'text/css', 'text/xml', 'application/json',
'application/javascript']
defaults = [
'application/javascript',
'application/json',
'text/css',
'text/html',
'text/javascript',
'text/xml',
]
self.assertEqual(self.app.config['COMPRESS_MIMETYPES'], defaults)

def test_level_default(self):
Expand Down

0 comments on commit 0abb794

Please sign in to comment.