<s> import os <EOL> import unittest <EOL> from betamax import Betamax <EOL> from requests import Session <EOL> class TestGZIPRegression ( unittest . TestCase ) : <EOL> def tearDown ( self ) : <EOL> os . unlink ( '<STR_LIT>' ) <EOL> def test_saves_content_as_gzip ( self ) : <EOL> s = Session ( ) <EOL> with Betamax ( s ) . use_cassette ( '<STR_LIT>' ) : <EOL> r = s . get ( <EOL> '<STR_LIT>' , <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> ) <EOL> assert r . headers . get ( '<STR_LIT>' ) == '<STR_LIT>' <EOL> assert r . json ( ) is not None <EOL> r2 = s . get ( <EOL> '<STR_LIT>' , <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> ) <EOL> assert r2 . headers . get ( '<STR_LIT>' ) == '<STR_LIT>' <EOL> assert r2 . json ( ) is not None <EOL> assert r2 . json ( ) == r . json ( ) <EOL> s = Session ( ) <EOL> with Betamax ( s ) . use_cassette ( '<STR_LIT>' ) : <EOL> r = s . get ( <EOL> '<STR_LIT>' <EOL> ) <EOL> assert r . json ( ) is not None </s>
