Ejemplo n.º 1
0
class TestRegion(TestCase):

    def setUp(self):
        self.temp = NamedTemporaryFile()
        self.fp = FilePath(self.temp.name)
        self.region = Region(self.fp)

    def test_trivial(self):
        pass

    def test_create(self):
        self.region.create()
        self.assertEqual(self.temp.read(), "\x00" * 8192)
Ejemplo n.º 2
0
class TestRegion(TestCase):

    def setUp(self):
        self.fp = FilePath(self.mktemp())
        self.region = Region(self.fp)

    def test_trivial(self):
        pass

    def test_create(self):
        self.region.create()
        with self.fp.open("r") as handle:
            self.assertEqual(handle.read(), "\x00" * 8192)