@pytest.mark.django_db
def test_update_comment(project0_nongnu, store0):
 db_unit = _update_translation(store0, 0, {'translator_comment': u'7amada'})
 store0.sync()
 store_unit = store0.file.store.findid(db_unit.getid())
 assert (db_unit.getnotes(origin='translator') == u'7amada')
 assert (db_unit.getnotes(origin='translator') == store_unit.getnotes(origin='translator'))
 po_file = factory.getobject(store0.file.path)
 assert (db_unit.getnotes(origin='translator') == po_file.findid(db_unit.getid()).getnotes(origin='translator'))

@ pytest . mark . django_db def test_update_comment ( project0_nongnu , store0 ) : db_unit = _update_translation ( store0 , 0 , { 'translator_comment' : u'7amada' } ) store0 . sync ( ) store_unit = store0 . file . store . findid ( db_unit . getid ( ) ) assert ( db_unit . getnotes ( origin = 'translator' ) == u'7amada' ) assert ( db_unit . getnotes ( origin = 'translator' ) == store_unit . getnotes ( origin = 'translator' ) ) po_file = factory . getobject ( store0 . file . path ) assert ( db_unit . getnotes ( origin = 'translator' ) == po_file . findid ( db_unit . getid ( ) ) . getnotes ( origin = 'translator' ) )
tests translator comments are stored and synced .