Ejemplo n.º 1
0
 def test_Default_DisabledByDefault(self):
     f = FeatureFlag(value=BoolFlag.DEFAULT,
                     behaviorOfDefault=BoolFlag.DISABLED)
     self.assertEqual(False, bool(f))
     self.assertEqual(BoolFlag.DISABLED, f.calculated())
     self.assertTrue(f == BoolFlag.DISABLED)  # overloaded operator ==
     self.assertEqual(f.enumClassType, BoolFlag)
Ejemplo n.º 2
0
 def test_Enabled_EnabledByDefault(self):
     f = FeatureFlag(value=BoolFlag.ENABLED,
                     behaviorOfDefault=BoolFlag.ENABLED)
     self.assertEqual(True, bool(f))
     self.assertEqual(BoolFlag.ENABLED, f.calculated())
     self.assertTrue(f == BoolFlag.ENABLED)  # overloaded operator ==
     self.assertEqual(f.enumClassType, BoolFlag)