[Answer]-Running Django management command from tests?

1πŸ‘

βœ…

It fails because in tuple of args You set only one argument, with is list of 3 values. You should use:

management.call_command('create_db_matviews', 'test', 'test', 'test', verbosity=0)

*agrs is pythons way to send multiple parameters and all of them will be send as tuple. You send (['test', 'test', 'test', ],)
so args[0] was ['test', 'test', 'test', ], not 'test'

πŸ‘€Dzarafata

Leave a comment