Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Fixed gzip tests by comparing decompressed values
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Grüb committed Oct 9, 2020
1 parent c49c79a commit 628b617
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions influxdb/tests/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ def test_write_gzip(self):
)

self.assertEqual(
m.last_request.body,
compressed.getvalue(),
gzip.decompress(m.last_request.body),
gzip.decompress(compressed.getvalue()),
)

def test_write_points_gzip(self):
Expand All @@ -276,9 +276,10 @@ def test_write_points_gzip(self):
b'cpu_load_short,host=server01,region=us-west '
b'value=0.64 1257894000123456000\n'
)

self.assertEqual(
m.last_request.body,
compressed.getvalue(),
gzip.decompress(m.last_request.body),
gzip.decompress(compressed.getvalue()),
)

def test_write_points_toplevel_attributes(self):
Expand Down

0 comments on commit 628b617

Please sign in to comment.