from unittest import TestCase

from krypto import hashes


class TestHashMod(TestCase):
    def test_hashMod(self):
        firstCall = hashes.hashMod("Sahnetorte".encode('utf-8'))
        secondCall = hashes.hashMod("Sahnetorte".encode('utf-8'))
        straingeCall = hashes.hashMod("Kirschkuchen".encode('utf-8'))

        self.assertEqual(firstCall, secondCall, "Die Werte sind gleich! -> Test geglückt") # firstCall and secondCall are Equal so test should finish with OK

        self.assertNotEqual(firstCall, straingeCall, "Die Werte sind ungleich, Test ebenfalls geglückt!")  # firstCall and straingeCall are not equal so test should finish with OK

        #self.assertEqual(firstCall, straingeCall, "Die Werte sind gleich! -> Test geglückt") # firstCall and Strainge call are not equal but equality is tested. Test should finish with FAILED
