Ejemplo n.º 1
0
 def test_createsuperuser(self):
     mock = MagicMock()
     with patch.dict(django.__salt__, {"cmd.run": mock}):
         django.createsuperuser("settings.py", "testuser", "[email protected]")
         mock.assert_called_once_with(
             "django-admin.py createsuperuser --settings=settings.py "
             "--noinput --username=testuser [email protected]"
         )
Ejemplo n.º 2
0
 def test_createsuperuser(self):
     mock = MagicMock()
     with patch.dict(django.__salt__,
                     {'cmd.run': mock}):
         django.createsuperuser(
             'settings.py', 'testuser', '[email protected]'
         )
         mock.assert_called_once_with(
             'django-admin.py createsuperuser --settings=settings.py '
             '--noinput --username=testuser [email protected]',
             env=None
         )