def test_user_file_thumbnail_path(data_fixture): handler = UserFileHandler() assert handler.user_file_thumbnail_path( 'test.jpg', 'tiny') == 'thumbnails/tiny/test.jpg' assert handler.user_file_thumbnail_path( 'another_file.png', 'small') == 'thumbnails/small/another_file.png' user_file = data_fixture.create_user_file() assert handler.user_file_thumbnail_path( user_file, 'tiny') == f'thumbnails/tiny/{user_file.name}'
def test_user_file_thumbnail_path(data_fixture): handler = UserFileHandler() assert ( handler.user_file_thumbnail_path("test.jpg", "tiny") == "thumbnails/tiny/test.jpg" ) assert ( handler.user_file_thumbnail_path("another_file.png", "small") == "thumbnails/small/another_file.png" ) user_file = data_fixture.create_user_file() assert ( handler.user_file_thumbnail_path(user_file, "tiny") == f"thumbnails/tiny/{user_file.name}" )