def test_command_with_args(self): mock = MagicMock() with patch.dict(django.__salt__, {'cmd.run': mock}): django.command('settings.py', 'runserver', None, None, 'noinput', 'somethingelse') mock.assert_called_once_with( 'django-admin.py runserver --settings=settings.py --noinput --somethingelse' )
def test_command_with_kwargs_ignore_dunder(self): mock = MagicMock() with patch.dict(django.__salt__, {'cmd.run': mock}): django.command('settings.py', 'runserver', None, None, __ignore='something') mock.assert_called_once_with( 'django-admin.py runserver --settings=settings.py')
def test_command_with_kwargs_ignore_dunder(self): mock = MagicMock() with patch.dict(django.__salt__, {'cmd.run': mock}): django.command('settings.py', 'runserver', None, None, __ignore='something') mock.assert_called_once_with('django-admin.py runserver --settings=settings.py')
def test_command_with_args(self): mock = MagicMock() with patch.dict(django.__salt__, {'cmd.run': mock}): django.command('settings.py', 'runserver', None, None, 'noinput', 'somethingelse') mock.assert_called_once_with('django-admin.py runserver --settings=settings.py --noinput --somethingelse')
def test_command(self): mock = MagicMock() with patch.dict(django.__salt__, {'cmd.run': mock}): django.command('settings.py', 'runserver') mock.assert_called_once_with('django-admin.py runserver --settings=settings.py')
def test_command(self): mock = MagicMock() with patch.dict(django.__salt__, {'cmd.run': mock}): django.command('settings.py', 'runserver') mock.assert_called_once_with( 'django-admin.py runserver --settings=settings.py')