Dieses Repository enthält Python-Dateien die im Rahmen des Wahlpflichtmoduls "Informationssysteme in der Medizintechnik" (Dozent: Prof. Dr. Oliver Hofmann) erstellt wurden und verwaltet deren Versionskontrolle.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_hashMod.py 854B

12345678910111213141516
  1. from unittest import TestCase
  2. from krypto import hashes
  3. class TestHashMod(TestCase):
  4. def test_hashMod(self):
  5. firstCall = hashes.hashMod("Sahnetorte".encode('utf-8'))
  6. secondCall = hashes.hashMod("Sahnetorte".encode('utf-8'))
  7. straingeCall = hashes.hashMod("Kirschkuchen".encode('utf-8'))
  8. self.assertEqual(firstCall, secondCall, "Die Werte sind gleich! -> Test geglückt") # firstCall and secondCall are Equal so test should finish with OK
  9. self.assertNotEqual(firstCall, straingeCall, "Die Werte sind ungleich, Test ebenfalls geglückt!") # firstCall and straingeCall are not equal so test should finish with OK
  10. #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