~jcsackett/charmworld/bac-tag-constraints

« back to all changes in this revision

Viewing changes to charmworld/tests/test_forms.py

  • Committer: Benji York
  • Date: 2013-11-18 20:38:47 UTC
  • mto: This revision was merged to the branch mainline in revision 465.
  • Revision ID: benji@benjiyork.com-20131118203847-2mfs1w7b8aqy64mr
checkpoint

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2014 Canonical Ltd.  This software is licensed under the GNU
2
 
# Affero General Public License version 3 (see the file LICENSE.txt).
3
 
 
4
 
from charmworld.forms.featured import (
5
 
    get_schema,
6
 
)
7
 
from charmworld.search import (
8
 
    BUNDLE,
9
 
    CHARM,
10
 
)
11
 
 
12
 
from unittest import TestCase
13
 
 
14
 
 
15
 
class TestGetSchema(TestCase):
16
 
 
17
 
    def test_CharmFeaturedness(self):
18
 
        schema = get_schema(CHARM)
19
 
        self.assertIn(
20
 
            'Feature this charm', schema.children[0].title)
21
 
 
22
 
    def test_BundleFeaturedness(self):
23
 
        schema = get_schema(BUNDLE)
24
 
        self.assertIn(
25
 
            'Feature this bundle', schema.children[0].title)