old_contents: import pytest
  from django.urls import reverse
  
  
  @pytest.mark.django_db
  def test_organisation_admin_form(client, organisation,
                                   admin, user_factory,
                                   group_factory):
  
      client.login(username=admin, password='password')
      url = reverse('admin:meinberlin_organisations_organisation_add')
      response = client.get(url)
      assert response.status_code == 200
  
      data = {'name': 'My Organisation'}
      response = client.post(url, data)
  
      assert 1 == 2
  
new_contents: import pytest
  from django.urls import reverse
  
  from meinberlin.apps.organisations.models import Organisation
  
  
  @pytest.mark.django_db
  def test_organisation_admin_form(client, user_factory, group_factory):
  
      admin = user_factory(is_superuser=True, is_staff=True)
  
      group1 = group_factory()
      group2 = group_factory()
  
      user = user_factory(groups=(group1, group2))
      assert user.groups.all().count() == 2
  
      client.force_login(admin)
  
      assert Organisation.objects.all().count() == 0
  
      url = reverse('admin:meinberlin_organisations_organisation_add')
      response = client.get(url)
      assert response.status_code == 200
  
      data = {'name': 'My Organisation'}
      response = client.post(url, data)
      assert response.status_code == 302
  
      assert Organisation.objects.all().count() == 1
  
      organisation = Organisation.objects.get(name='My Organisation')
  
      url = reverse(
          'admin:meinberlin_organisations_organisation_change',
          args=(organisation.id,))
  
      response = client.get(url)
      assert response.status_code == 200
  
      data = {'name': organisation.name,
              'groups': group1.id}
      response = client.post(url, data)
  
      assert response.status_code == 302
      organisation = Organisation.objects.get(name='My Organisation')
      assert organisation.groups.all().count() == 1
      assert organisation.groups.all().first() == group1
  
      data = {'name': organisation.name,
              'groups': [group1.id, group2.id]
              }
      response = client.post(url, data)
  
      msg = '{} is member of several groups ' \
            'in that organisation.'.format(user.email)
      assert msg in response.context['errors'][0]
      assert response.status_code == 200
  
      group1.user_set.remove(user)
  
      data = {'name': organisation.name,
              'groups': [group1.id, group2.id]
              }
      response = client.post(url, data)
      assert response.status_code == 302
  
      organisation = Organisation.objects.get(name='My Organisation')
      assert organisation.groups.all().count() == 2
      assert user.groups.all().count() == 1
  
subject: add test to not allow to save organisation with two same user