示例#1
0
 def test_get_value_missingallinputs(self):
     """
     :return: NA
     Missing all inputs
     """
     with self.assertRaises(TypeError):
         utils.get_value()
示例#2
0
 def test_get_value_missingoneinput(self):
     """
     :return: NA
     Missing one input
     """
     with self.assertRaises(TypeError):
         utils.get_value(self.y)
示例#3
0
 def test_get_value_randomstringsinput(self):
     """
     :return: NA
     Search for a random string
     """
     self.assertEqual(utils.get_value('asdlk;jasdjasdljasdljasd','125nj15knjhpo1n5+++++'), 'None')
示例#4
0
 def test_get_value_yd(self):
     """
     :return: NA
     Search for the corresponding value of d in y
     """
     self.assertEqual(utils.get_value(self.y, 'd'), 2)
示例#5
0
 def test_get_value_yb(self):
     """
     :return: NA
     Search for the corresponding value of b in y
     """
     self.assertEqual(utils.get_value(self.y, 'b'), 'None')
示例#6
0
 def test_get_value_xb(self):
     """
     :return: NA
     Search for the corresponding value of b in x
     """
     self.assertEqual(utils.get_value(self.x, 'b'), 52)
示例#7
0
 def test_get_value_xq(self):
     """
     :return: NA
     Search for the corresponding value of q in x
     """
     self.assertEqual(utils.get_value(self.x, 'q'), 'None')