<s> from boto . route53 . zone import Zone <EOL> from tests . compat import mock , unittest <EOL> class TestZone ( unittest . TestCase ) : <EOL> def test_find_records ( self ) : <EOL> mock_connection = mock . Mock ( ) <EOL> zone = Zone ( mock_connection , { } ) <EOL> zone . id = None <EOL> rr_names = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> mock_rrs = [ ] <EOL> for rr_name in rr_names : <EOL> mock_rr = mock . Mock ( ) <EOL> mock_rr . name = rr_name <EOL> mock_rr . type = '<STR_LIT:A>' <EOL> mock_rr . weight = None <EOL> mock_rr . region = None <EOL> mock_rrs . append ( mock_rr ) <EOL> mock_rrs [ <NUM_LIT:3> ] = None <EOL> mock_connection . get_all_rrsets . return_value = mock_rrs <EOL> mock_connection . _make_qualified . return_value = '<STR_LIT>' <EOL> try : <EOL> result_rrs = zone . find_records ( '<STR_LIT>' , '<STR_LIT:A>' , all = True ) <EOL> except AttributeError as e : <EOL> self . fail ( "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> self . assertEqual ( result_rrs , [ mock_rrs [ <NUM_LIT:0> ] , mock_rrs [ <NUM_LIT:1> ] ] ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
