Ticket #1972 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: Chris Arndt Assigned to: 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)

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

08/30/08 12:27:19 changed by Chris Arndt

  • description changed.

09/11/08 17:43:23 changed 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).

09/17/08 15:22:12 changed 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.