def test_map_view(self):
        stmts = ["CREATE VIEW v1 AS SELECT now()::date AS today",
                 "GRANT SELECT ON v1 TO PUBLIC",
                 "GRANT REFERENCES ON v1 TO user1"]
        dbmap = self.to_map(stmts, no_privs=False)
        expmap = {'definition': " SELECT now()::date AS today;",
                  'privileges': [{self.db.user: ['all']},
                                 {'PUBLIC': ['select']},
                                 {'user1': ['references']}]}
        assert dbmap['schema public']['view v1'] == expmap
Spawn a thread to handle incoming messages.
dataset/ETHPy150Open perseas/Pyrseas/tests/dbobject/test_privs.py/PrivilegeToMapTestCase.test_map_view--crossover with--dataset/ETHPy150Open Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/openstack/common/rpc/common.py/Connection.consume_in_thread