Ejemplo n.º 1
0
 def test_label_matches_multi_fail(self):
     """
     Test case when CLI label does not match list of pattern labels
     """
     res = main.label_matches('l1', ['l2', 'l3'])
     self.assertFalse(res)
Ejemplo n.º 2
0
 def test_label_matches_no_pattern_label(self):
     """
     Test case when CLI label is supplied, but pattern has none
     """
     res = main.label_matches('l1', None)
     self.assertFalse(res)
Ejemplo n.º 3
0
 def test_label_matches_multi_success(self):
     """
     Test for success if CLI label is in list of pattern labels
     """
     res = main.label_matches('l1', ['l1', 'l2'])
     self.assertTrue(res)
Ejemplo n.º 4
0
 def test_label_matches_fail(self):
     """
     Test for failure if CLI label doesn't match pattern label
     """
     res = main.label_matches('l1', 'l2')
     self.assertFalse(res)
Ejemplo n.º 5
0
 def test_label_matches_success(self):
     """
     Test success if CLI label matches pattern label
     """
     res = main.label_matches('l1', 'l1')
     self.assertTrue(res)
Ejemplo n.º 6
0
 def test_label_matches_no_cli_label(self):
     """
     Test when label is not supplied it matches anything
     """
     res = main.label_matches(None, 'l1')
     self.assertTrue(res)