예제 #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)
예제 #2
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)
예제 #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"])
예제 #4
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"])