Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1972 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Controller tests in 1.5 quickstart templates are out-of-date

Reported by: Chris Arndt Owned by: kskuhlman
Priority: normal Milestone: 1.5
Component: Tests Version: 1.5 HEAD
Severity: normal Keywords: tests, testutil, quickstart templates
Cc:

Description (last modified by Chris Arndt) (diff)

There are several outdate code issues in the test_controllers.py module in the quickstart templates of the 1.5 branch which cause errors in the contained tests when running the unit test suite of a project.

  • The test methods use a non-existant testutil.go()function.
  • The setUp/tearDown method don't call the methods from the superclass and are redundant anyway, since the superclass already calls start_server/stop_server.
  • On line / testutil.mount(root = Root()) should be `testutil.mount(Root())
  • import cherry and import unittest are not necessary.
  • The TestPages class should derive from testutil.TGTest (and testutil.TGWebTest needs to be renamed to testutil.TGTest like in the 1.1 branch.

It's probably best to copy over the file from the quickstart templates of the 1.1 branch.

I also get errors because the template welcome.kid (!) is not found. It seems that the test does not set tg.defaultview = "genshi" although it is set in app.cfg of the project.

Change History

comment:1 Changed 9 years ago by Chris Arndt

  • Description modified (diff)

comment:2 Changed 9 years ago by kskuhlman

  • Status changed from new to assigned

Mostly fixed in r5402 by porting r5276 testing changes to 1.5.

The import of unittest is still there, but it's also in 1.1 right now.

I'll look at the welcome.kid issue once I've got the remaining 1.1 changes ported (in the next day or 2).

comment:3 Changed 9 years ago by kskuhlman

  • Status changed from assigned to closed
  • Resolution set to fixed

The config problem went away when I finished merging 1.1 changes over to 1.5.

Note: See TracTickets for help on using tickets.