def test_get_flags_list_of_dicts(self): source = SettingsFlagsSource() flags = source.get_flags() self.assertEqual( flags, {'MY_FLAG': [ Condition('boolean', True, required=True), ]})
def test_get_flags_two_tuple(self): source = SettingsFlagsSource() flags = source.get_flags() self.assertEqual( flags, {'MY_FLAG': [ Condition('boolean', True, required=False), ]})
def test_get_flags_list_of_dicts_without_required(self): source = SettingsFlagsSource() flags = source.get_flags() self.assertEqual( flags, {"MY_FLAG": [Condition("boolean", True, required=False)]}, )
def test_get_flags_two_tuple(self): source = SettingsFlagsSource() flags = source.get_flags() self.assertEqual( flags, {"MY_FLAG": [Condition("boolean", True, required=False)]}, )
def test_get_flags_dict(self): source = SettingsFlagsSource() with warnings.catch_warnings(record=True) as warning_list: flags = source.get_flags() self.assertTrue( any(item.category == FutureWarning for item in warning_list)) self.assertEqual( flags, {'MY_FLAG': [ Condition('boolean', True, required=False), ]})