Replace set with add

Add is used for single objects which makes more sense for thise tests.
This commit is contained in:
Andreas Zweili 2023-03-13 09:37:00 +01:00
parent a213266a77
commit 79be6c58f2
2 changed files with 2 additions and 10 deletions

View File

@ -29,11 +29,7 @@ def test_customer_detail_view(create_admin_user):
project_manager = User.objects.create_superuser(
"meyer", "meyer@contria.com", "password"
)
customer.project_manager.set(
[
project_manager,
]
)
customer.project_manager.add(project_manager)
client = Client()
client.login(username="pharma-admin", password="password")
response = client.get("/customer/" + str(customer.id) + "/")

View File

@ -34,11 +34,7 @@ def test_customer_list_view(create_admin_user):
)
fixture = create_admin_user()
customer = fixture["customer"]
customer.project_manager.set(
[
project_manager,
]
)
customer.project_manager.add(project_manager)
client = Client()
client.login(username="pharma-admin", password="password")
response = client.get("/")