def test_project_domain_id_sysmeta_set_to_unknown(self):
        proj_id = '12345678'
        # token scoped to a different project
        headers = get_identity_headers(tenant_id='87654321',
                                       project_domain_id='default',
                                       role='reselleradmin')
        account = get_account_for_tenant(self.test_auth, proj_id)
        path = '/v1/' + account
        # fake cached account info
        _, info_key = _get_cache_key(account, None)
        env = {info_key: {'status': 0, 'sysmeta': {}},
               'keystone.token_info': _fake_token_info(version='3')}
        req = Request.blank(path, environ=env, headers=headers)
        req.method = 'POST'
        fake_app = FakeApp(iter([('200 OK', {}, '')]))
        test_auth = keystoneauth.filter_factory({})(fake_app)
        resp = req.get_response(test_auth)
        self.assertEqual(resp.status_int, 200)
        self.assertEqual(len(fake_app.call_contexts), 1)
        headers_sent = fake_app.call_contexts[0]['headers']
        self.assertTrue('X-Account-Sysmeta-Project-Domain-Id' in headers_sent,
                        headers_sent)
        self.assertEqual(headers_sent['X-Account-Sysmeta-Project-Domain-Id'],
                         UNKNOWN_ID)
dataset/ETHPy150Open openstack/swift/test/unit/common/middleware/test_keystoneauth.py/SwiftAuth.test_project_domain_id_sysmeta_set_to_unknown/original