@pytest.mark.nondestructive
def test_most_popular_extensions_are_sorted_by_users(base_url, selenium):
 page = Home(selenium, base_url).open()
 extensions = page.most_popular.extensions
 sorted_by_users = sorted(extensions, key=(lambda e: e.users), reverse=True)
 assert (sorted_by_users == extensions)

@ pytest . mark . nondestructive def test_most_popular_extensions_are_sorted_by_users ( base_url , selenium ) : page = Home ( selenium , base_url ) . open ( ) extensions = page . most_popular . extensions sorted_by_users = sorted ( extensions , key = ( lambda e : e . users ) , reverse = True ) assert ( sorted_by_users == extensions )
most popular add-ons are sorted by popularity .