コード例 #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)