added example tests
This commit is contained in:
parent
3c56ba308f
commit
18233aa4e6
|
|
@ -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)
|
||||||
|
|
@ -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
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
|
@ -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 django.test import TestCase
|
||||||
|
|
||||||
from server.vbv_lernwelt.learnpath.models import LearningPath
|
from server.vbv_lernwelt.learnpath.models import LearningPath
|
||||||
|
|
@ -19,5 +8,3 @@ class TestCreateDefaultLearningPaths(TestCase):
|
||||||
def test_create_learning_path(self):
|
def test_create_learning_path(self):
|
||||||
create_default_learning_path()
|
create_default_learning_path()
|
||||||
self.assertTrue(LearningPath.objects.filter(title="Versicherungsvermittler/in").exist())
|
self.assertTrue(LearningPath.objects.filter(title="Versicherungsvermittler/in").exist())
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 ')
|
||||||
|
|
||||||
Loading…
Reference in New Issue