# HG changeset patch # User Laurent Peuch # Date 1550758582 -3600 # Node ID e3bcfd6432bc6c4d336955e60f8b88cccc8dd407 # Parent 247b86512d9471be529310ca461da8275d59c72e [doc] default tests template has changed diff -r 247b86512d94 -r e3bcfd6432bc doc/tutorials/advanced/part02_security.rst --- a/doc/tutorials/advanced/part02_security.rst Thu Feb 21 15:13:45 2019 +0100 +++ b/doc/tutorials/advanced/part02_security.rst Thu Feb 21 15:16:22 2019 +0100 @@ -309,10 +309,10 @@ .. sourcecode:: python - from cubicweb.devtools.testlib import CubicWebTC + from cubicweb.devtools import testlib from cubicweb import Binary - class SecurityTC(CubicWebTC): + class SecurityTC(testlib.CubicWebTC): def test_visibility_propagation(self): with self.admin_access.repo_cnx() as cnx: @@ -355,8 +355,8 @@ self.assertEquals(1, len(cnx.execute('Folder X'))) # and to restricted folder if __name__ == '__main__': - from logilab.common.testlib import unittest_main - unittest_main() + from unittest import main + main() It's not complete, but shows most things you'll want to do in tests: adding some content, creating users and connecting as them in the test, etc...