

def test_get_container_list_full_listing(self):
    status_codes = [200, 200]
    obj_a = dict(name='foo', hash='foo', bytes=3, content_type='text/plain', last_modified='2011/01/01')
    obj_b = dict(name='bar', hash='bar', bytes=3, content_type='text/plain', last_modified='2011/01/01')
    body = [json.dumps([obj_a]), json.dumps([obj_b]), json.dumps([])]
    internal_proxy.Application = DumbApplicationFactory(status_codes, body=body)
    p = internal_proxy.InternalProxy()
    resp = p.get_container_list('a', 'c')
    expected = ['foo', 'bar']
    self.assertEquals([x['name'] for x in resp], expected)

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