Пример #1
0
 def test_with_unrecognised_name(self):
     with self.assertRaises(AttributeError):
         ext_names_to_ids("foobar")
Пример #2
0
    def test_with_id_and_name(self):
        ret = ext_names_to_ids("0 heartbeat")

        self.assertEqual(ret, [0, 15])
Пример #3
0
    def test_with_two_ids(self):
        ret = ext_names_to_ids("0 1")

        self.assertEqual(ret, [0, 1])
Пример #4
0
    def test_with_id(self):
        ret = ext_names_to_ids("0")

        self.assertEqual(ret, [0])
Пример #5
0
    def test_with_name(self):
        ret = ext_names_to_ids("server_name")

        self.assertEqual(ret, [0])
Пример #6
0
    def test_with_empty(self):
        ret = ext_names_to_ids("")

        self.assertEqual(ret, [])