<s> from preggy import expect <EOL> from tests . base import FilterTestCase <EOL> class FocalFilterTestCase ( FilterTestCase ) : <EOL> def test_focal_filter_valid ( self ) : <EOL> self . get_filtered ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) <EOL> expect ( self . context . request . focal_points [ <NUM_LIT:0> ] . origin ) . to_equal ( "<STR_LIT>" ) <EOL> expect ( self . context . request . focal_points [ <NUM_LIT:0> ] . height ) . to_equal ( <NUM_LIT> ) <EOL> expect ( self . context . request . focal_points [ <NUM_LIT:0> ] . width ) . to_equal ( <NUM_LIT> ) <EOL> expect ( self . context . request . focal_points [ <NUM_LIT:0> ] . y ) . to_equal ( <NUM_LIT> ) <EOL> expect ( self . context . request . focal_points [ <NUM_LIT:0> ] . x ) . to_equal ( <NUM_LIT> ) <EOL> def test_focal_filter_no_change ( self ) : <EOL> def config_context ( context ) : <EOL> context . request . width = <NUM_LIT> <EOL> context . request . height = <NUM_LIT> <EOL> image = self . get_filtered ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) <EOL> expected = self . get_fixture ( '<STR_LIT>' ) <EOL> ssim = self . get_ssim ( image , expected ) <EOL> expect ( ssim ) . to_be_greater_than ( <NUM_LIT> ) <EOL> def test_focal_filter_pass_through_empty ( self ) : <EOL> image = self . get_filtered ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) <EOL> expected = self . get_fixture ( '<STR_LIT>' ) <EOL> ssim = self . get_ssim ( image , expected ) <EOL> expect ( ssim ) . to_be_greater_than ( <NUM_LIT> ) <EOL> def test_focal_filter_pass_through_invalid ( self ) : <EOL> image = self . get_filtered ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) <EOL> expected = self . get_fixture ( '<STR_LIT>' ) <EOL> ssim = self . get_ssim ( image , expected ) <EOL> expect ( ssim ) . to_be_greater_than ( <NUM_LIT> ) <EOL> def test_focal_filter_pass_through_dumb ( self ) : <EOL> image = self . get_filtered ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) <EOL> expected = self . get_fixture ( '<STR_LIT>' ) <EOL> ssim = self . get_ssim ( image , expected ) <EOL> expect ( ssim ) . to_be_greater_than ( <NUM_LIT> ) </s>
