dataimport/test/test_massive_store.py
changeset 10857 aa490912d9da
parent 10855 cd91f46fa633
child 10858 1a3e56e346d2
equal deleted inserted replaced
10856:b839167d99a4 10857:aa490912d9da
   170             store.create_entity('Location', name=u'toto')
   170             store.create_entity('Location', name=u'toto')
   171             store.flush()
   171             store.flush()
   172             cnx.commit()
   172             cnx.commit()
   173         with self.admin_access.repo_cnx() as cnx:
   173         with self.admin_access.repo_cnx() as cnx:
   174             crs = cnx.system_sql("SELECT * FROM entities_id_seq")
   174             crs = cnx.system_sql("SELECT * FROM entities_id_seq")
   175             self.assertTrue(crs.fetchone() > 50000)
   175             self.assertTrue(crs.fetchone()[0] > 50000)
   176 
   176 
   177     def test_eid_entity(self):
   177     def test_eid_entity(self):
   178         with self.admin_access.repo_cnx() as cnx:
   178         with self.admin_access.repo_cnx() as cnx:
   179             store = MassiveObjectStore(cnx, eids_seq_range=1000, eids_seq_start=50000)
   179             store = MassiveObjectStore(cnx, eids_seq_range=1000, eids_seq_start=50000)
   180             entity = store.create_entity('Location', name=u'toto')
   180             entity = store.create_entity('Location', name=u'toto')