Esempio n. 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)
Esempio n. 2
0
    def test_string(self):
        """ Test that strings are correctly identified. """

        self.n = bencode.ben_type("4:test")
        self.assertEqual(self.n, str)
Esempio n. 3
0
    def test_list(self):
        """ Test that lists are correctly identified. """

        self.n = bencode.ben_type("l4:teste")
        self.assertEqual(self.n, list)
Esempio n. 4
0
    def test_integers(self):
        """ Test that integers are correctly identified. """

        self.n = bencode.ben_type("i1e")
        self.assertEqual(self.n, int)
	def test_dict(self):
		""" Test that dictionaries are correctly identified. """

		self.n = bencode.ben_type("d3:key5:valuee")
		self.assertEqual(self.n, dict)
	def test_list(self):
		""" Test that lists are correctly identified. """

		self.n = bencode.ben_type("l4:teste")
		self.assertEqual(self.n, list)
	def test_string(self):
		""" Test that strings are correctly identified. """

		self.n = bencode.ben_type("4:test")
		self.assertEqual(self.n, str)
	def test_integers(self):
		""" Test that integers are correctly identified. """

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