added example tests

This commit is contained in:
Lorenz Padberg 2022-03-31 15:17:32 +02:00
parent 3c56ba308f
commit 18233aa4e6
6 changed files with 39 additions and 16 deletions

View File

@ -0,0 +1,16 @@
from django.test import TestCase
from server.vbv_lernwelt.core.models import User
from vbv_lernwelt.core.tests.factories import UserFactory
from vbv_lernwelt.simpletodo.models import SimpleList
class TestUserCreation(TestCase):
def test_create_user(self):
User(name='Sepp').save()
def test_simple(self):
# create_default_learning_path()
self.user = UserFactory()
SimpleList.objects.get_or_create(title='Default', user=self.user)
self.assertTrue(True)

View File

@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
#
# Iterativ GmbH
# http://www.iterativ.ch/
#
# Copyright (c) 2015 Iterativ GmbH. All rights reserved.
#
# Created on 2022-03-31
# @author: lorenz.padberg@iterativ.ch

View File

@ -1,3 +0,0 @@
from django.test import TestCase
# Create your tests here.

View File

@ -1,14 +1,3 @@
# -*- coding: utf-8 -*-
#
# Iterativ GmbH
# http://www.iterativ.ch/
#
# Copyright (c) 2015 Iterativ GmbH. All rights reserved.
#
# Created on 2022-03-29
# @author: lorenz.padberg@iterativ.ch
from django.test import TestCase
from server.vbv_lernwelt.learnpath.models import LearningPath
@ -19,5 +8,3 @@ class TestCreateDefaultLearningPaths(TestCase):
def test_create_learning_path(self):
create_default_learning_path()
self.assertTrue(LearningPath.objects.filter(title="Versicherungsvermittler/in").exist())

View File

@ -0,0 +1,14 @@
from django.test import TestCase
from server.vbv_lernwelt.core.models import User
class TestWhatever(TestCase):
def test_print(self):
print("hallo " * 80)
def test_user(self):
User.objects.get_or_create(name='hallo ')