def test_create_primary_key(self):
        inmap = self.std_map()
        inmap['schema public'].update({'table t1': {
            'columns': [{'c1': {'type': 'integer', 'not_null': True}},
                        {'c2': {'type': 'text'}}],
            'primary_key': {'t1_pkey': {'columns': ['c1'],
                                        'tablespace': 'ts2'}},
            'tablespace': 'ts1'}})
        sql = self.to_sql(inmap)
        assert fix_indent(sql[0]) == "CREATE TABLE t1 " \
            "(c1 integer NOT NULL, c2 text) TABLESPACE ts1"
        assert fix_indent(sql[1]) == "ALTER TABLE t1 ADD CONSTRAINT " \
            "t1_pkey PRIMARY KEY (c1) USING INDEX TABLESPACE ts2"
Get keys to self.__entities_by_* from the given key.
dataset/ETHPy150Open perseas/Pyrseas/tests/dbobject/test_tablespace.py/ToSqlTestCase.test_create_primary_key--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/datastore_file_stub.py/DatastoreFileStub._GetEntityLocation