~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/tests/test_service_usage.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-10-11 09:06:29 UTC
  • mfrom: (14120.2.8 bug-869089)
  • Revision ID: launchpad@pqm.canonical.com-20111011090629-2t5okp0ri4ow6yr0
[r=benji][bug=677532, 869089][incr] Good riddance to official_rosetta.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
            ServiceUsage.UNKNOWN,
62
62
            self.target.translations_usage)
63
63
 
64
 
    def test_translations_usage_using_bool(self):
65
 
        # If the old bool says they use Launchpad, return LAUNCHPAD
66
 
        # if the ServiceUsage is unknown.
67
 
        login_person(self.target.owner)
68
 
        self.target.official_rosetta = True
69
 
        self.assertEqual(
70
 
            ServiceUsage.LAUNCHPAD,
71
 
            self.target.translations_usage)
72
 
 
73
64
    def test_translations_usage_with_enum_data(self):
74
65
        # If the enum has something other than UNKNOWN as its status,
75
66
        # use that.
79
70
            ServiceUsage.EXTERNAL,
80
71
            self.target.translations_usage)
81
72
 
82
 
    def test_translations_setter(self):
83
 
        login_person(self.target.owner)
84
 
        self.target.official_rosetta = True
85
 
        self.target.translations_usage = ServiceUsage.EXTERNAL
86
 
        self.assertEqual(
87
 
            False,
88
 
            self.target.official_rosetta)
89
 
        self.target.translations_usage = ServiceUsage.LAUNCHPAD
90
 
        self.assertEqual(
91
 
            True,
92
 
            self.target.official_rosetta)
93
 
 
94
73
    def test_bug_tracking_usage(self):
95
74
        # Only test get for bug_tracking; this has no setter because the
96
75
        # state is derived from other data.