Пример #1
0
 def test_convert_to_int_str(self):
     self.assertEqual(4, attributes.convert_to_int('4'))
     self.assertEqual(6, attributes.convert_to_int('6'))
     self.assertRaises(n_exc.InvalidInput, attributes.convert_to_int,
                       'garbage')
Пример #2
0
 def test_convert_to_int_int(self):
     self.assertEqual(-1, attributes.convert_to_int(-1))
     self.assertEqual(0, attributes.convert_to_int(0))
     self.assertEqual(1, attributes.convert_to_int(1))
Пример #3
0
 def test_convert_to_int_int(self):
     self.assertEqual(attributes.convert_to_int(-1), -1)
     self.assertEqual(attributes.convert_to_int(0), 0)
     self.assertEqual(attributes.convert_to_int(1), 1)
Пример #4
0
 def test_convert_to_int_str(self):
     self.assertEqual(4, attributes.convert_to_int('4'))
     self.assertEqual(6, attributes.convert_to_int('6'))
     self.assertRaises(n_exc.InvalidInput,
                       attributes.convert_to_int,
                       'garbage')
Пример #5
0
 def test_convert_to_int_int(self):
     self.assertEqual(-1, attributes.convert_to_int(-1))
     self.assertEqual(0, attributes.convert_to_int(0))
     self.assertEqual(1, attributes.convert_to_int(1))
Пример #6
0
 def test_convert_to_int_int(self):
     self.assertEqual(attributes.convert_to_int(-1), -1)
     self.assertEqual(attributes.convert_to_int(0), 0)
     self.assertEqual(attributes.convert_to_int(1), 1)