def test_length_is_correct(self): encoded = filepost.encode_multipart_formdata(self.parts, self.boundary)[0] assert len(encoded) == self.instance.len
def test_encodes_data_the_same(self): encoded = filepost.encode_multipart_formdata(self.parts, self.boundary)[0] assert encoded == self.instance.read()