def test_fact_components_valid_on_none_type_segDimValue(self): """ Tests to make sure that a Fact.context with a None type segDimValue is not valid """ fact = Mock(decimals='-2', value='6500', xValue=6500, precision=None) fact.context.segDimValues = None self.assertFalse(fact_lib.fact_components_valid(fact))
def test_fact_components_valid_on_none_type_context(self): """ Tests to make sure that a Fact with a None type context is not valid """ fact = Mock(decimals='-1', value='670', xValue=670, precision=None) fact.context = None self.assertFalse(fact_lib.fact_components_valid(fact))
def test_fact_components_valid_on_none_type_fact(self): """ Tests to make sure that a None type fact is not valid """ fact = None self.assertFalse(fact_lib.fact_components_valid(fact))
def test_fact_components_valid_on_valid_fact(self): """ Tests to make sure that a valid fact still works """ fact = Mock(decimals='-4', value='869098', xvalue = 869098, precision = None) self.assertTrue(fact_lib.fact_components_valid(fact))