@pytest.mark.django_db
def test_approve_addons_approve_files_no_review_type():
 amo.tests.user_factory(id=settings.TASK_USER_ID)
 addon = addon_factory(status=amo.STATUS_PUBLIC)
 file_ = addon.versions.get().files.get()
 file_.update(status=amo.STATUS_PUBLIC)
 approve_addons.approve_files([(file_, None)])
 assert (addon.reload().status == amo.STATUS_PUBLIC)
 assert (file_.reload().status == amo.STATUS_PUBLIC)

@ pytest . mark . django_db def test_approve_addons_approve_files_no_review_type ( ) : amo . tests . user_factory ( id = settings . TASK_USER_ID ) addon = addon_factory ( status = amo . STATUS_PUBLIC ) file_ = addon . versions . get ( ) . files . get ( ) file_ . update ( status = amo . STATUS_PUBLIC ) approve_addons . approve_files ( [ ( file_ , None ) ] ) assert ( addon . reload ( ) . status == amo . STATUS_PUBLIC ) assert ( file_ . reload ( ) . status == amo . STATUS_PUBLIC )
files which dont need approval dont change status .