def test_get_actual_4(self): """Check assert safety""" key_cus = "0" key_mov = "2043" try: self.assertEqual(get_actual(key_mov, key_cus), 0) except AssertionError: pass else: raise ValueError("Getter tried fetching non-positive integer")
def test_get_actual_2(self): """Check assert safety""" key_mov = "0" key_cus = "1417435" cache = {("1417435", "123"): 3} try: self.assertEqual(get_actual(key_mov, key_cus, cache), 0) except AssertionError: pass else: raise ValueError("Getter tried fetching non-positive integer")
def test_get_actual_3(self): """Return 0 if not in cache""" key_mov = "999999999999" key_cus = "999999999999" cache = {("1417435", "123"): 3} self.assertEqual(get_actual(key_mov, key_cus, cache), 0)
def test_get_actual_1(self): """Fetch actual rating 3""" key_mov = "123" key_cus = "234" cache = {("123", "234"): 3} self.assertEqual(get_actual(key_mov, key_cus, cache), 3)
def test_get_actual_3(self): """Return 0 if not in cache""" key_mov = "999999999999" key_cus = "999999999999" self.assertEqual(get_actual(key_mov, key_cus), 0)
def test_get_actual_1(self): """Fetch actual rating 3""" key_mov = "2043" key_cus = "1417435" self.assertEqual(get_actual(key_mov, key_cus), 3)