MCPcopy Create free account
hub / github.com/rthalley/dnspython / testToFileBinaryStream

Method testToFileBinaryStream

tests/test_zone.py:370–376  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

368 self.assertEqual(out, example_text_output)
369
370 def testToFileBinaryStream(self):
371 z = dns.zone.from_text(example_text, "example.", relativize=True)
372 f = BytesIO()
373 z.to_file(f, nl=b"\n")
374 out = f.getvalue()
375 f.close()
376 self.assertEqual(out, example_text_output.encode())
377
378 def testToFileTextual(self):
379 z = dns.zone.from_file(here("example"), "example")

Callers

nothing calls this directly

Calls 4

to_fileMethod · 0.80
from_textMethod · 0.45
closeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected