~jcsackett/charmworld/bac-tag-constraints

« back to all changes in this revision

Viewing changes to charmworld/views/tests/test_misc.py

[r=sinzui][bug=1208477][author=abentley] Remove doctype attribute.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
from paste.deploy import loadapp
11
11
from paste.deploy.config import PrefixMiddleware
12
12
 
13
 
from charmworld.models import FeaturedSource
14
13
from charmworld.testing import (
15
14
    factory,
16
15
    ViewTestBase,
17
16
    WebTestBase,
18
17
)
 
18
from charmworld.views.misc import heartbeat
19
19
from charmworld.tests.test_health import TestCheckMixin
20
 
from charmworld.views.misc import heartbeat
21
20
 
22
21
 
23
22
class TestAppConfig(unittest.TestCase):
108
107
 
109
108
    def test_all_checks_pass(self):
110
109
        # All checks pass when the services are available and data is returned.
111
 
        charm_data = factory.makeCharm(self.db, downloads=5)[1]
 
110
        ignore, charm_data = factory.makeCharm(
 
111
            self.db, downloads=5, is_featured=True)
112
112
        self.use_index_client()
113
113
        self.index_client.index_charm(charm_data)
114
 
        FeaturedSource.from_db(self.db).set_featured(charm_data, 'charm')
115
114
        response = heartbeat(self.getRequest())
116
115
        checks = response['checks']
117
116
        remark = '1 charms found'