def test_parse_requirement(self): """Test parse requirements of a function to dictionary.""" myRequirement = requirements_collect(F4)[0] parsed_req = parse_single_requirement(myRequirement) expected_req = {'category': 'hazard', 'subcategory': ['flood', 'tsunami']} myMessage = 'Get %s should be % s' % (parsed_req, expected_req) assert parsed_req == expected_req, myMessage myRequirement = requirements_collect(F4)[1] parsed_req = parse_single_requirement(myRequirement) expected_req = {'category': 'exposure', 'subcategory': ['building', 'structure'], 'layertype': 'vector'} myMessage = 'Get %s should be % s' % (parsed_req, expected_req) assert parsed_req == expected_req, myMessage
def test_parse_requirement(self): """Test parse requirements of a function to dictionary.""" myRequirement = requirements_collect(F4)[0] parsed_req = parse_single_requirement(myRequirement) expected_req = { 'category': 'hazard', 'subcategory': ['flood', 'tsunami'] } myMessage = 'Get %s should be % s' % (parsed_req, expected_req) assert parsed_req == expected_req, myMessage myRequirement = requirements_collect(F4)[1] parsed_req = parse_single_requirement(myRequirement) expected_req = { 'category': 'exposure', 'subcategory': ['building', 'structure'], 'layertype': 'vector' } myMessage = 'Get %s should be % s' % (parsed_req, expected_req) assert parsed_req == expected_req, myMessage