

def test_upload_file_with_retries(self):
    status_codes = [200, 500, 200]
    internal_proxy.Application = DumbApplicationFactory(status_codes)
    p = internal_proxy.InternalProxy(retries=3)
    with tempfile.NamedTemporaryFile() as file_obj:
        resp = p.upload_file(file_obj, 'a', 'c', 'o')
    self.assertTrue(resp)
    self.assertEquals(p.upload_app.call_count, 3)

dataset/ETHPy150Open notmyname/slogging/test_slogging/unit/test_internal_proxy.py TestInternalProxy.test_upload_file_with_retries/original