def test_use_fields_as_options_enumerated(self):
        # Create a resource with a command that doesn't expect its
        # fields to become options.
        class NoOptResource(models.BaseResource):
            endpoint = '/nor/'

            f1 = models.Field()
            f2 = models.Field()

            @resources.command(use_fields_as_options=('f2',))
            def noopt(self):
                pass

        # Make the resource into a command, and get the noopt subcommand.
        noopt = NoOptResource().as_command().get_command(None, 'noopt')

        # Establish that the noopt command does NOT have fields as options.
        self.assertFalse(any([o.name == 'f1' for o in noopt.params]))
        self.assertTrue(any([o.name == 'f2' for o in noopt.params]))
Establish that the `use_fields_as_options` attribute is honored
dataset/ETHPy150Open ansible/tower-cli/tests/test_models_base.py/SubcommandTests.test_use_fields_as_options_enumerated