def test_finish_matcher(self): options_dict_b = { u"configuration": u"straight-tops", u"material-choices": { u"default": u"standard-laminate", u"name": u"Material", u"type": u"set::string", u"values": { u"name": u"Standard Laminate", u"options": { u"finish": u"$ref:/finishes/opendesk/standard-laminate" }, u"type": u"string", u"value": u"standard-laminate" } } } b_matcher = KeyMatcher.from_dict(options_dict_b) self.assertEqual(b_matcher.options["material-choices/finish"], "$ref:/finishes/opendesk/standard-laminate")
def __init__(self, d): """ really its just a wrapped around an existing dict """ self.store = d self.matcher = KeyMatcher.from_dict(d)