'Test marker and null container format ascending
Tests that the registry API returns 200
when a marker and a null container_format are combined
ascending order'

def test_get_index_marker_and_container_format_asc(self):

    UUID3 = _gen_uuid()
    extra_fixture = {'id': UUID3, 'status': 'active', 'visibility': 'public', 'disk_format': 'vhd', 'container_format': None, 'name': 'Fake    image', 'size': 19, 'checksum': None}
    db_api.image_create(self.context, extra_fixture)
    req = webob.Request.blank('/rpc')
    req.method = 'POST'
    cmd = [{'command': 'image_get_all', 'kwargs': {'marker': UUID3, 'sort_key': ['container_format'], 'sort_dir': ['asc']}}]
    req.body = jsonutils.dump_as_bytes(cmd)
    res = req.get_response(self.api)
    self.assertEqual(http.OK, res.status_int)
    images = jsonutils.loads(res.body)[0]
    self.assertEqual(2, len(images))
