deprecated all old vue stuff and working on tests

This commit is contained in:
vabene1111
2022-06-07 20:08:32 +02:00
parent 37f0f7a0b7
commit e368488933
22 changed files with 1803 additions and 12510 deletions

View File

@ -5,6 +5,8 @@ import pytest
from django.contrib import auth
from django.urls import reverse
from cookbook.models import UserSpace
LIST_URL = 'api:username-list'
DETAIL_URL = 'api:username-detail'
@ -62,8 +64,7 @@ def test_list_space(u1_s1, u2_s1, u1_s2, space_2):
assert len(json.loads(u1_s2.get(reverse(LIST_URL)).content)) == 1
u = auth.get_user(u2_s1)
u.userpreference.space = space_2
u.userpreference.save()
UserSpace.objects.create(user=u, space=space_2)
assert len(json.loads(u1_s1.get(reverse(LIST_URL)).content)) == 1
assert len(json.loads(u1_s2.get(reverse(LIST_URL)).content)) == 2