@pytest.mark.django_db
def test_max_revision(revision, project0_nongnu, store0):
 store0.sync()
 store0.update(store0.file.store)
 initial_max_revision = Unit.max_revision()
 initial_revision = Revision.get()
 assert (initial_max_revision == initial_revision)
 for i in range(10):
  _update_translation(store0, 0, {'target': str(i)}, sync=False)
 end_max_revision = Unit.max_revision()
 end_revision = Revision.get()
 assert (end_max_revision == end_revision)
 assert (end_max_revision != initial_max_revision)
 assert (end_revision != initial_revision)
 assert (end_revision == (10 + initial_revision))

@ pytest . mark . django_db def test_max_revision ( revision , project0_nongnu , store0 ) : store0 . sync ( ) store0 . update ( store0 . file . store ) initial_max_revision = Unit . max_revision ( ) initial_revision = Revision . get ( ) assert ( initial_max_revision == initial_revision ) for i in range ( 10 ) : _update_translation ( store0 , 0 , { 'target' : str ( i ) } , sync = False ) end_max_revision = Unit . max_revision ( ) end_revision = Revision . get ( ) assert ( end_max_revision == end_revision ) assert ( end_max_revision != initial_max_revision ) assert ( end_revision != initial_revision ) assert ( end_revision == ( 10 + initial_revision ) )
tests max_revision() gets the latest revision .