X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/blobdiff_plain/2344dcf6736372c1dd359a95819fb3c2e131afc2..27a5f3e06c91fb5ae49f753f1fb1e1f78142f9c0:/sercom/tests/test_model.py diff --git a/sercom/tests/test_model.py b/sercom/tests/test_model.py index 2b96ca0..30c160d 100644 --- a/sercom/tests/test_model.py +++ b/sercom/tests/test_model.py @@ -5,18 +5,21 @@ # which is very fast. from turbogears import testutil, database -# from sercom.model import YourDataClass, User +from sercom.model import Curso -# database.set_db_uri("sqlite:///:memory:") +database.set_db_uri("sqlite:///:memory:") -# class TestUser(testutil.DBTest): -# def get_model(self): -# return User -# def test_creation(self): -# "Object creation should set the name" -# obj = User(user_name = "creosote", -# email_address = "spam@python.not", -# display_name = "Mr Creosote", -# password = "Wafer-thin Mint") -# assert obj.display_name == "Mr Creosote" +class TestCurso(testutil.DBTest): + def get_model(self): + return Curso + def test_creation(self): + "Object creation should set the name" + c = Curso(anio=2007, cuatrimestre=1, numero=1) + assert c.anio == 2007 + assert c.cuatrimestre == 1 + assert c.numero == 1 + assert c.docentes == [] + assert c.alumnos == [] + assert c.grupos == [] + assert c.ejercicios == []