def test_create_fd_wrapper(self):
        inmap = self.std_map()
        inmap.update({'foreign data wrapper fdw1': {
            'owner': self.db.user,
            'privileges': [{self.db.user: ['all']}, {'PUBLIC': ['usage']}]}})
        sql = self.to_sql(inmap)
        # sql[0] = CREATE FDW
        # sql[1] = ALTER FDW OWNER
        assert sql[2] == "GRANT USAGE ON FOREIGN DATA WRAPPER fdw1 " \
            "TO %s" % self.db.user
        assert sql[3] == "GRANT USAGE ON FOREIGN DATA WRAPPER fdw1 TO PUBLIC"
Create a foreign data wrapper with some privileges
dataset/ETHPy150Open perseas/Pyrseas/tests/dbobject/test_privs.py/PrivilegeToSqlTestCase.test_create_fd_wrapper