From 73632cf9cbfa35c98c678b5571029d7d3b8564f5 Mon Sep 17 00:00:00 2001 From: Konsta Vesterinen Date: Tue, 18 Feb 2014 13:42:54 +0200 Subject: [PATCH] Add tests for getdotattr --- tests/functions/test_getdotattr.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/functions/test_getdotattr.py b/tests/functions/test_getdotattr.py index 61d1cc4..2eeae43 100644 --- a/tests/functions/test_getdotattr.py +++ b/tests/functions/test_getdotattr.py @@ -3,8 +3,7 @@ from sqlalchemy_utils.functions import getdotattr from tests import TestCase - -class TestTwoWayAttributeValueGeneration(TestCase): +class TestGetDotAttr(TestCase): def create_models(self): class Document(self.Base): __tablename__ = 'document' @@ -22,7 +21,7 @@ class TestTwoWayAttributeValueGeneration(TestCase): sa.Integer, sa.ForeignKey(Document.id) ) - document = sa.orm.relationship(Document) + document = sa.orm.relationship(Document, backref='sections') class SubSection(self.Base): __tablename__ = 'subsection' @@ -34,7 +33,7 @@ class TestTwoWayAttributeValueGeneration(TestCase): sa.Integer, sa.ForeignKey(Section.id) ) - section = sa.orm.relationship(Section) + section = sa.orm.relationship(Section, backref='subsections') self.Document = Document self.Section = Section