Beispiel #1
0
def select_keyword(results, tags):
    
    os.system('clear')  
    print """KEYWORD
-------

Would you like to filter by keyword (ex. Christian Bale)?
"""
    
    try:
        desired_tags = [str(raw_input("Your choice (Enter to skip): "))]
    except SyntaxError:
        desired_tags = None
    
    filtered_results = filter_by_tag(results, tags, desired_tags)
    
    return filtered_results
Beispiel #2
0
def select_keyword(results, tags):
    
    os.system('clear')  
    print """KEYWORD
-------

Would you like to filter by keyword (ex. Christian Bale)?
"""
    
    try:
        desired_tags = [str(raw_input("Your choice (Enter to skip): "))]
    except SyntaxError:
        desired_tags = None
    
    filtered_results = filter_by_tag(results, tags, desired_tags)
    
    return filtered_results
Beispiel #3
0
 def test_recent_concelho_latin_species_name_return_records(self):
     self.request_matches('/report/?concelho=loures&species=ficedula hypoleuca', 
         filter_by_tag(filter_by_tag(load_yaml_fixture('recent.yaml'), 'concelho:loures'), 'ficedula hypoleuca'))
Beispiel #4
0
 def test_recent_concelho_por_species_name_return_records(self):
     self.request_matches('/report/?concelho=loures&species=papa moscas', 
         filter_by_tag(filter_by_tag(load_yaml_fixture('recent.yaml'), 'concelho:loures'), 'papa moscas'))
Beispiel #5
0
 def test_recent_concelho_return_records(self):
     self.request_matches('/report/?concelho=loures&species=all', 
         filter_by_tag(load_yaml_fixture('recent.yaml'), 'concelho:loures'))
Beispiel #6
0
 def test_recent_region_return_records(self):
     self.request_matches('/report/?region=lisboa&species=all', 
         filter_by_tag(load_yaml_fixture('recent.yaml'), 'region:lisboa'))