Skip to content

Commit

Permalink
fix flake8 (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek authored Apr 5, 2024
1 parent e2b37de commit a48c8ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/analytics/reports/generate_report_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_generate_svg(self):
report = generate_report(options, mimetype=MIME_TYPES.SVG, base64=False)

# Report is a buffer of bytes with size > 0
self.assertTrue(type(report) == bytes)
self.assertTrue(isinstance(report, bytes))
self.assertTrue(len(report) > 0)

# The bytes buffer represents an xml/svg file
Expand All @@ -47,7 +47,7 @@ def test_generate_png(self):
report = generate_report(options, mimetype=MIME_TYPES.PNG, base64=False, width=800)

# Report is a buffer of bytes with size > 0
self.assertTrue(type(report) == bytes)
self.assertTrue(isinstance(report, bytes))
self.assertTrue(len(report) > 0)

image = Image.open(BytesIO(report))
Expand All @@ -67,7 +67,7 @@ def test_generate_jpg(self):
report = generate_report(options, mimetype=MIME_TYPES.JPEG, base64=False, width=1200)

# Report is a buffer of bytes with size > 0
self.assertTrue(type(report) == bytes)
self.assertTrue(isinstance(report, bytes))
self.assertTrue(len(report) > 0)

image = Image.open(BytesIO(report))
Expand All @@ -87,7 +87,7 @@ def test_generate_pdf(self):
report = generate_report(options, mimetype=MIME_TYPES.PDF, base64=False, width=1200)

# Report is a buffer of bytes with size > 0
self.assertTrue(type(report) == bytes)
self.assertTrue(isinstance(report, bytes))
self.assertTrue(len(report) > 0)

# PDF header/footer signature
Expand Down

0 comments on commit a48c8ae

Please sign in to comment.