Exemple #1
0
 def test_matches_template_bad(self):
     import meshy as m
     self.assertFalse(m._matches_template(
         {'a':1, 'b':'two', 'c':[3]}, {'a':2}))
     self.assertFalse(m._matches_template(
         {'a':1, 'b':'two', 'c':[3]}, {'a':1, 'b':'wo'}))
     self.assertFalse(m._matches_template(
         {'a':1, 'b':'two', 'c':[3]}, {'c':3}))
Exemple #2
0
 def test_matches_template_good(self):
     import meshy as m
     self.assertTrue(m._matches_template(
         {'a':1, 'b':'two', 'c':[3]}, {'a':1}))
     self.assertTrue(m._matches_template(
         {'a':1, 'b':'two', 'c':[3]}, {'a':1, 'b':'two'}))
     self.assertTrue(m._matches_template(
         {'a':1, 'b':'two', 'c':[3]}, {'a':1, 'b':'two', 'c':[3]}))