def test_hide_reveal_byte_inverse(data_to_hide):
    """Anything hidden by _hide_byte is revealed by _reveal_byte."""
    clean_data = bytes(b'\x01' * 8)

    stegs = Steganographer()
    revealed_byte = stegs._reveal_byte(
        stegs._hide_byte(clean_data, data_to_hide[0]))
    assert revealed_byte == data_to_hide
def test_reveal_byte():
    """The _reveal_byte function returns a bytes object of the hidden byte."""
    stegs = Steganographer()
    test_data = bytearray(stegs._BYTELEN)
    test_data[1] = 1
    test_data[7] = 1
    solution_data = bytes('A', 'utf-8')

    assert stegs._reveal_byte(test_data) == solution_data