@pytest.fixture(params=[(amo.STATUS_NOMINATED, amo.STATUS_AWAITING_REVIEW, 'full'), (amo.STATUS_PUBLIC, amo.STATUS_AWAITING_REVIEW, 'full')], ids=id_function)
def use_case(request, db):
 (addon_status, file_status, review_type) = request.param
 addon = addon_factory(status=addon_status, guid='foo')
 version = addon.find_latest_version(amo.RELEASE_CHANNEL_LISTED)
 file1 = version.files.get()
 file1.update(status=file_status)
 file2 = amo.tests.file_factory(version=version, status=file_status)
 addon.update(status=addon_status)
 assert (addon.reload().status == addon_status)
 assert (file1.reload().status == file_status)
 assert (file2.reload().status == file_status)
 return (addon, file1, file2, review_type)

@ pytest . fixture ( params = [ ( amo . STATUS_NOMINATED , amo . STATUS_AWAITING_REVIEW , 'full' ) , ( amo . STATUS_PUBLIC , amo . STATUS_AWAITING_REVIEW , 'full' ) ] , ids = id_function ) def use_case ( request , db ) : ( addon_status , file_status , review_type ) = request . param addon = addon_factory ( status = addon_status , guid = 'foo' ) version = addon . find_latest_version ( amo . RELEASE_CHANNEL_LISTED ) file1 = version . files . get ( ) file1 . update ( status = file_status ) file2 = amo . tests . file_factory ( version = version , status = file_status ) addon . update ( status = addon_status ) assert ( addon . reload ( ) . status == addon_status ) assert ( file1 . reload ( ) . status == file_status ) assert ( file2 . reload ( ) . status == file_status ) return ( addon , file1 , file2 , review_type )
this fixture will return quadruples for different use cases .