tests/category.py

changeset 93
ffe05d369412
parent 89
d2b277cb948e
equal deleted inserted replaced
92:b8d72909d593 93:ffe05d369412
16 'and not by description', 16 'and not by description',
17 category = category, 17 category = category,
18 ) 18 )
19 ) 19 )
20 def category_test(model): 20 def category_test(model):
21 if model.header.valid: 21 # Only test the category if the description does not start with a '~'
22 if model.header.valid and not model.header.description.startswith('~'):
22 categories = library_standards['categories'] 23 categories = library_standards['categories']
23 illegal_categories_in_description = [ 24 illegal_categories_in_description = [
24 category_name.lower() 25 category_name.lower()
25 for category_name in categories.keys() 26 for category_name in categories.keys()
26 if ' ' in category_name 27 if ' ' in category_name

mercurial