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 #118 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

[PATCH] Add tests to quickstart project

Reported by: kevin Owned by: anonymous
Priority: normal Milestone: 0.9
Component: TurboGears Version:
Severity: normal Keywords: develix
Cc:

Description

quickstart should make it easy to start running Nose tests.

Attachments

quickstart_tests.patch Download (2.9 KB) - added by jens@… 13 years ago.
Patch adding tests

Change History

comment:1 Changed 13 years ago by elvelind@…

in what way? just by adding a dir for testes and setting test_suite = 'nose.collector' in setup.py which should make setup.py test work

comment:2 Changed 13 years ago by kevin

  • Keywords develix added

I also think it would be good to have a couple of tests in there (one using testutil.create_request and another using testutil.call) to show how tests are done.

comment:3 Changed 13 years ago by jens@…

  • Status changed from new to assigned
  • Summary changed from Add tests to quickstart project to [PATCH] Add tests to quickstart project

The attached patch adds three tests to the quickstart project, one for each: testutil.call testutil.createRequest testutil.DBTest

It also adds a DummyRequest? object to testutils, which is used in testutil.call() to make it possible to test methods decorated with turbogears.expose() (this is very inspired by the patch in #181)

Changed 13 years ago by jens@…

Patch adding tests

comment:4 Changed 13 years ago by kevin

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

committed in [598]. Thanks!

comment:5 Changed 13 years ago by michele

Nice! Just a nit, shouldn't those tests respect PEP-8? they are using camelCase for everything.

Note: See TracTickets for help on using tickets.