def test_table_new_grant(self):
        inmap = self.std_map()
        inmap['schema public'].update({'table t1': {
            'columns': [{'c1': {'type': 'integer'}}, {'c2': {'type': 'text'}}],
            'owner': self.db.user,
            'privileges': [{self.db.user: ['all']}, {'user1': ['select']}]}})
        sql = self.to_sql(inmap, [CREATE_TABLE])
        assert len(sql) == 2
        sql = sorted(sql)
        assert sql[0] == "GRANT ALL ON TABLE t1 TO %s" % self.db.user
        assert sql[1] == GRANT_SELECT % 'user1'
Grant select privileges on an existing table
dataset/ETHPy150Open perseas/Pyrseas/tests/dbobject/test_privs.py/PrivilegeToSqlTestCase.test_table_new_grant