'Test the ability to download a release archive.'

@pytest.mark.xfail((requests.__build__ >= 135424), reason='Requests    2.11.0    breaks    our    cassettes')
def test_archive(self):

    cassette_name = self.cassette_name('archive')
    with self.recorder.use_cassette(cassette_name, preserve_exact_body_bytes=True):
        repository = self.gh.repository('sigmavirus24', 'github3.py')
        release = repository.release(76677)
        (_, filename) = tempfile.mkstemp()
        release.archive('tarball', path=filename)
    with open(filename, 'rb') as fd:
        assert (len(fd.read(1024)) > 0)
    os.unlink(filename)
