def test_command_with_pk(self):
        # Create a resource with an appropriate command.
        class PKResource(models.BaseResource):
            endpoint = '/pkr/'

            @resources.command
            def my_method(self, pk):
                pass

        # Get the command version of my_method.
        my_method = PKResource().as_command().get_command(None, 'my_method')

        # Establish that the `my_method` command does, in fact, have a PK
        # click argument attached.
        self.assertEqual(my_method.params[-1].name, 'pk')
A model step. Move, then eat grass and reproduce.
dataset/ETHPy150Open ansible/tower-cli/tests/test_models_base.py/SubcommandTests.test_command_with_pk--crossover with--dataset/ETHPy150Open projectmesa/mesa/examples/WolfSheep/WolfSheep.py/Sheep.step