@pytest.mark.django_db
def test_update_target(project0_nongnu, store0):
 db_unit = _update_translation(store0, 0, {'target': u'samaka'})
 store0.sync()
 store_unit = store0.file.store.findid(db_unit.getid())
 assert (db_unit.target == u'samaka')
 assert (db_unit.target == store_unit.target)
 po_file = factory.getobject(store0.file.path)
 assert (db_unit.target == po_file.findid(db_unit.unitid).target)

@ pytest . mark . django_db def test_update_target ( project0_nongnu , store0 ) : db_unit = _update_translation ( store0 , 0 , { 'target' : u'samaka' } ) store0 . sync ( ) store_unit = store0 . file . store . findid ( db_unit . getid ( ) ) assert ( db_unit . target == u'samaka' ) assert ( db_unit . target == store_unit . target ) po_file = factory . getobject ( store0 . file . path ) assert ( db_unit . target == po_file . findid ( db_unit . unitid ) . target )
tests that target changes are properly synced to disk .