def test_sequence_new_grant(self):
        inmap = self.std_map()
        inmap['schema public'].update({'sequence seq1': {
            'start_value': 1, 'increment_by': 1, 'max_value': None,
            'min_value': None, 'cache_value': 1, 'owner': self.db.user,
            'privileges': [{self.db.user: ['all']}, {'PUBLIC': ['select']}]}})
        sql = sorted(self.to_sql(inmap, ["CREATE SEQUENCE seq1"]))
        assert len(sql) == 2
        assert sql[0] == "GRANT ALL ON SEQUENCE seq1 TO %s" % self.db.user
        assert sql[1] == "GRANT SELECT ON SEQUENCE seq1 TO PUBLIC"
Grant privileges on an existing sequence
dataset/ETHPy150Open perseas/Pyrseas/tests/dbobject/test_privs.py/PrivilegeToSqlTestCase.test_sequence_new_grant