Example #1
0
    def test_read_false(self):
        """
        Test that a Boolean object representing the value False can be read
        from a byte stream.
        """
        encoding = (b'\x42\x00\x00\x06\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00'
                    b'\x00\x00')
        stream = BytearrayStream(encoding)
        boolean = Boolean()

        boolean.read(stream)

        self.assertFalse(boolean.value)