def test_syncdb_migrate(self): mock = MagicMock() with patch.dict(django.__salt__, {'cmd.run': mock}): django.syncdb('settings.py', migrate=True) mock.assert_called_once_with( 'django-admin.py syncdb --settings=settings.py --migrate ' '--noinput')
def test_syncdb(self): mock = MagicMock() with patch.dict(django.__salt__, {'cmd.run': mock}): django.syncdb('settings.py') mock.assert_called_once_with( 'django-admin.py syncdb --settings=settings.py --noinput', env=None)
def test_django_admin_cli_syncdb(self): mock = MagicMock() with patch.dict(djangomod.__salt__, {'cmd.run': mock}): djangomod.syncdb('settings.py') mock.assert_called_once_with( 'django-admin.py syncdb --settings=settings.py --noinput', python_shell=False, env=None)
def test_syncdb(self): mock = MagicMock() with patch.dict(django.__salt__, {'cmd.run': mock}): django.syncdb('settings.py') mock.assert_called_once_with( 'django-admin.py syncdb --settings=settings.py --noinput', env=None )
def test_django_admin_cli_syncdb(self): mock = MagicMock() with patch.dict(djangomod.__salt__, {"cmd.run": mock}): djangomod.syncdb("settings.py") mock.assert_called_once_with( "django-admin.py syncdb --settings=settings.py --noinput", python_shell=False, env=None, runas=None, )
def test_syncdb_migrate(self): mock = MagicMock() with patch.dict(django.__salt__, {'cmd.run': mock}): django.syncdb('settings.py', migrate=True) mock.assert_called_once_with( 'django-admin.py syncdb --settings=settings.py --migrate ' '--noinput', python_shell=False, env=None )
def test_syncdb(self): """ Test if it runs the Django-Admin syncdb command """ mock = MagicMock(return_value=True) with patch.dict(djangomod.__salt__, {"cmd.run": mock}): self.assertTrue(djangomod.syncdb("DJANGO_SETTINGS_MODULE"))
def test_syncdb(self): ''' Test if it runs the Django-Admin syncdb command ''' mock = MagicMock(return_value=True) with patch.dict(djangomod.__salt__, {'cmd.run': mock}): self.assertTrue(djangomod.syncdb('DJANGO_SETTINGS_MODULE'))
def test_syncdb_migrate(self): mock = MagicMock() with patch.dict(django.__salt__, {"cmd.run": mock}): django.syncdb("settings.py", migrate=True) mock.assert_called_once_with("django-admin.py syncdb --settings=settings.py --migrate " "--noinput")