@pytest.mark.django_db
def test_convert(project0_nongnu, store0):
 store0.sync()
 for db_unit in store0.units.iterator():
  store_unit = store0.file.store.findid(db_unit.getid())
  newunit = db_unit.convert(store0.file.store.UnitClass)
  assert (str(newunit) == str(store_unit))

@ pytest . mark . django_db def test_convert ( project0_nongnu , store0 ) : store0 . sync ( ) for db_unit in store0 . units . iterator ( ) : store_unit = store0 . file . store . findid ( db_unit . getid ( ) ) newunit = db_unit . convert ( store0 . file . store . UnitClass ) assert ( str ( newunit ) == str ( store_unit ) )
tests that in-db and on-disk units match after format conversion .