def test_for_check_pairs2(self): test_pairs = [ ('a', 'read', str(int)), ('a', 'write', str(int)), # se face si write pe 'a' ('b', 'read', str(int)), ('c', 'write', str(int)) ] expected_result = None self.assertEqual(dptAnalyzer.for_check_pairs(test_pairs), expected_result)
def test_for_check_pairs1(self): test_pairs = [ ('a', 'read', str(int)), ('a', 'read', str(int)), ('b', 'read', str(int)), ('c', 'write', str(int)) ] expected_result = { 'a': {'access': ['read'], 'type': str(int)}, 'b': {'access': ['read'], 'type': str(int)}, 'c': {'access': ['write'], 'type': str(int)} } self.assertEqual(dptAnalyzer.for_check_pairs(test_pairs), expected_result)