~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/tests/test_bzremotecomponentfinder.py

  • Committer: Curtis Hovey
  • Date: 2011-06-02 22:20:27 UTC
  • mto: This revision was merged to the branch mainline in revision 13177.
  • Revision ID: curtis.hovey@canonical.com-20110602222027-dg1u6i2p40la52qe
Hush lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
__all__ = []
9
9
 
10
10
import os
11
 
import unittest
12
11
import transaction
13
12
 
14
13
from canonical.testing import DatabaseFunctionalLayer
105
104
 
106
105
        # Set up remote bug tracker with synthetic data
107
106
        bz_bugtracker = BugzillaRemoteComponentScraper(
108
 
            base_url = "http://bugzilla.example.org")
 
107
            base_url="http://bugzilla.example.org")
109
108
        bz_bugtracker.products = {
110
109
            u'alpha': {
111
110
                'name': u'alpha',
147
146
            title="fdo-example",
148
147
            name="fdo-example")
149
148
        transaction.commit()
150
 
        bz_bugtracker = BugzillaRemoteComponentScraper(
151
 
            base_url = "http://bugzilla.example.org")
 
149
        BugzillaRemoteComponentScraper(
 
150
            base_url="http://bugzilla.example.org")
152
151
 
153
152
        page_text = read_test_file("bugzilla-fdo-advanced-query.html")
154
153
        finder = BugzillaRemoteComponentFinder(
165
164
        self.assertIsNot(None, comp)
166
165
        self.assertEqual(u'Driver/Radeon', comp.name)
167
166
 
168
 
# FIXME: This takes ~9 sec to run, but mars says new testsuites need to compete in 2
 
167
# FIXME: This takes ~9 sec to run, but mars says new testsuites need to
 
168
#        compete in 2
169
169
#    def test_cronjob(self):
170
170
#        """Runs the cron job to verify it executes without error"""
171
171
#        import subprocess
182
182
#        self.assertTrue('ERROR' not in err)
183
183
#        self.assertTrue('CRITICAL' not in err)
184
184
#        self.assertTrue('Exception raised' not in err)
185
 
 
186
 
def test_suite():
187
 
    suite = unittest.TestSuite()
188
 
    suite.addTest(unittest.TestLoader().loadTestsFromName(__name__))
189
 
 
190
 
    return suite