Misc improvements.

This commit is contained in:
Cédric Bonhomme 2016-05-21 22:20:05 +02:00
parent 6cd22dfe72
commit d850bbd8a0
No known key found for this signature in database
GPG key ID: A1CB94DE57B7A70D
6 changed files with 30 additions and 31 deletions

View file

@ -35,13 +35,9 @@ class TestLSBSet(unittest.TestCase):
"""
Test hiding the empty string.
"""
secret = lsbset.hide("./tests/sample-files/Lenna.png", "",
"eratosthenes")
secret.save("./image.png")
clear_message = lsbset.reveal("./image.png", "eratosthenes")
self.assertEqual("", clear_message)
with self.assertRaises(AssertionError):
secret = lsbset.hide("./tests/sample-files/Lenna.png", "",
"eratosthenes")
def test_hide_and_reveal(self):
messages_to_hide = ["a", "foo", "Hello World!", ":Python:"]