~james-w/udd/management-commands

« back to all changes in this revision

Viewing changes to udd/tests/test_count_outstanding_jobs.py

  • Committer: James Westby
  • Date: 2011-12-13 21:09:23 UTC
  • mfrom: (557.1.1 drop_email_failures)
  • Revision ID: james.westby@canonical.com-20111213210923-tfrirlx3xbwmi70u
Merged drop_email_failures into management-commands.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import sqlite3
 
2
 
 
3
from udd import tests
 
4
 
 
5
from udd.scripts import count_outstanding_jobs
 
6
 
 
7
 
 
8
class TestCountOutstandingJobs(tests.TestCaseWithConfig):
 
9
 
 
10
    def test_empty(self):
 
11
        # The script fails if the JOBS table is not defined (which is the case
 
12
        # in an empty db).
 
13
        self.assertRaises(sqlite3.OperationalError, count_outstanding_jobs.main)