Ejemplo n.º 1
0
 def test_django_admin_cli_migrate(self):
     mock = MagicMock()
     with patch.dict(djangomod.__salt__, {"cmd.run": mock}):
         djangomod.migrate("settings.py")
         mock.assert_called_once_with(
             "django-admin.py migrate --settings=settings.py --noinput",
             python_shell=False,
             env=None,
             runas=None,
         )
Ejemplo n.º 2
0
 def test_migrate(self):
     """
     Test if it runs the Django-Admin migrate command
     """
     mock = MagicMock(return_value=True)
     with patch.dict(djangomod.__salt__, {"cmd.run": mock}):
         self.assertTrue(djangomod.migrate("DJANGO_SETTINGS_MODULE"))
Ejemplo n.º 3
0
 def test_migrate(self):
     '''
     Test if it runs the Django-Admin migrate command
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(djangomod.__salt__, {'cmd.run': mock}):
         self.assertTrue(djangomod.migrate('DJANGO_SETTINGS_MODULE'))