Esempio n. 1
0
    def setUp(self):
        """ Write a little file, and turn it into an info dict. """

        self.filename = "test.txt"
        with open(self.filename, "w") as self.file:
            self.file.write("Test file.")
        self.d = torrent.make_info_dict(self.filename)
	def setUp(self):
		""" Write a little file, and turn it into an info dict. """

		self.filename = "test.txt"
		with open(self.filename, "w") as self.file:
			self.file.write("Test file.")
		self.d = torrent.make_info_dict(self.filename)
Esempio n. 3
0
    def test_info_dict(self):
        """ Test that the info dict is correct. """

        self.info = torrent.make_info_dict(self.filename)
        self.assertEqual(self.info, self.t["info"])
	def test_info_dict(self):
		""" Test that the info dict is correct. """

		self.info = torrent.make_info_dict(self.filename)
		self.assertEqual(self.info, self.t["info"])