@pytest.mark.django_db
def test_update_save_changed_units(project0_nongnu, store0):
 store = store0
 store.sync()
 store.update(store.file.store)
 unit_list = list(store.units)
 store.file = 'tutorial/ru/update_save_changed_units_updated.po'
 store.update(store.file.store)
 updated_unit_list = list(store.units)
 for index in range(0, len(unit_list)):
  unit = unit_list[index]
  updated_unit = updated_unit_list[index]
  if (unit.target == updated_unit.target):
   assert (unit.revision == updated_unit.revision)
   assert (unit.mtime == updated_unit.mtime)

@ pytest . mark . django_db def test_update_save_changed_units ( project0_nongnu , store0 ) : store = store0 store . sync ( ) store . update ( store . file . store ) unit_list = list ( store . units ) store . file = 'tutorial/ru/update_save_changed_units_updated.po' store . update ( store . file . store ) updated_unit_list = list ( store . units ) for index in range ( 0 , len ( unit_list ) ) : unit = unit_list [ index ] updated_unit = updated_unit_list [ index ] if ( unit . target == updated_unit . target ) : assert ( unit . revision == updated_unit . revision ) assert ( unit . mtime == updated_unit . mtime )
tests that any update saves changed units only .