Пример #1
0
    def test_dict(self):
        """ Test that dictionaries are correctly identified. """

        self.n = bencode.ben_type("d3:key5:valuee")
        self.assertEqual(self.n, dict)
Пример #2
0
    def test_string(self):
        """ Test that strings are correctly identified. """

        self.n = bencode.ben_type("4:test")
        self.assertEqual(self.n, str)
Пример #3
0
    def test_list(self):
        """ Test that lists are correctly identified. """

        self.n = bencode.ben_type("l4:teste")
        self.assertEqual(self.n, list)
Пример #4
0
    def test_integers(self):
        """ Test that integers are correctly identified. """

        self.n = bencode.ben_type("i1e")
        self.assertEqual(self.n, int)
Пример #5
0
	def test_dict(self):
		""" Test that dictionaries are correctly identified. """

		self.n = bencode.ben_type("d3:key5:valuee")
		self.assertEqual(self.n, dict)
Пример #6
0
	def test_list(self):
		""" Test that lists are correctly identified. """

		self.n = bencode.ben_type("l4:teste")
		self.assertEqual(self.n, list)
Пример #7
0
	def test_string(self):
		""" Test that strings are correctly identified. """

		self.n = bencode.ben_type("4:test")
		self.assertEqual(self.n, str)
Пример #8
0
	def test_integers(self):
		""" Test that integers are correctly identified. """

		self.n = bencode.ben_type("i1e")
		self.assertEqual(self.n, int)