예제 #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)