def testCheckModelAttributeParityWithoutErrors(self):

    result = check_model_consistency._checkModelAttributeParity(
      engineMetrics=_ACTIVE_PARITY_WITH_ONE_ERROR_METRIC["engineMetrics"],
      dynamodbMetrics=_ACTIVE_PARITY_WITH_ONE_ERROR_METRIC["dynamodbMetrics"],
      verbose=False)

    self.assertEqual(result, ([], []))

    result = check_model_consistency._checkModelAttributeParity(
      engineMetrics=_PERFECT_PARITY_ALL_ACTIVE["engineMetrics"],
      dynamodbMetrics=_PERFECT_PARITY_ALL_ACTIVE["dynamodbMetrics"],
      verbose=False)

    self.assertEqual(result, ([], []))
예제 #2
0
    def testCheckModelAttributeParityWithoutErrors(self):

        result = check_model_consistency._checkModelAttributeParity(
            engineMetrics=_ACTIVE_PARITY_WITH_ONE_ERROR_METRIC[
                "engineMetrics"],
            dynamodbMetrics=_ACTIVE_PARITY_WITH_ONE_ERROR_METRIC[
                "dynamodbMetrics"],
            verbose=False)

        self.assertEqual(result, ([], []))

        result = check_model_consistency._checkModelAttributeParity(
            engineMetrics=_PERFECT_PARITY_ALL_ACTIVE["engineMetrics"],
            dynamodbMetrics=_PERFECT_PARITY_ALL_ACTIVE["dynamodbMetrics"],
            verbose=False)

        self.assertEqual(result, ([], []))
  def testCheckModelAttributeParityWithSymbolMismatch(self):
    engineMetrics = copy.deepcopy(_PERFECT_PARITY_ALL_ACTIVE["engineMetrics"])

    dynamodbMetrics = copy.deepcopy(
      _PERFECT_PARITY_ALL_ACTIVE["dynamodbMetrics"])

    dynamodbMetrics[0]["symbol"] = "eeesymbol"

    warnings, errors = check_model_consistency._checkModelAttributeParity(
      engineMetrics=engineMetrics,
      dynamodbMetrics=dynamodbMetrics,
      verbose=False)

    self.assertEqual(warnings, [])
    self.assertEqual(len(errors), 1)
예제 #4
0
    def testCheckModelAttributeParityWithSymbolMismatch(self):
        engineMetrics = copy.deepcopy(
            _PERFECT_PARITY_ALL_ACTIVE["engineMetrics"])

        dynamodbMetrics = copy.deepcopy(
            _PERFECT_PARITY_ALL_ACTIVE["dynamodbMetrics"])

        dynamodbMetrics[0]["symbol"] = "eeesymbol"

        warnings, errors = check_model_consistency._checkModelAttributeParity(
            engineMetrics=engineMetrics,
            dynamodbMetrics=dynamodbMetrics,
            verbose=False)

        self.assertEqual(warnings, [])
        self.assertEqual(len(errors), 1)