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 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"])