コード例 #1
0
ファイル: test_features.py プロジェクト: sunbiz/zamboni
    def _test_kwargs(self, prefix):
        profile = FeatureProfile.from_int(self.features)
        kwargs = profile.to_kwargs(prefix=prefix)

        ok_(all([k.startswith(prefix) for k in kwargs.keys()]))
        eq_(kwargs.values().count(False), bin(self.features)[2:].count('0'))
        eq_(len(kwargs.values()), len(APP_FEATURES) - len(self.truths))
コード例 #2
0
ファイル: test_features.py プロジェクト: at13/zamboni
    def _test_kwargs(self, prefix):
        profile = FeatureProfile.from_int(self.features)
        kwargs = profile.to_kwargs(prefix=prefix)

        ok_(all([k.startswith(prefix) for k in kwargs.keys()]))
        eq_(kwargs.values().count(False), bin(self.features)[2:].count('0'))
        eq_(len(kwargs.values()), len(APP_FEATURES) - len(self.truths))
コード例 #3
0
 def test_from_int_limit(self):
     profile = FeatureProfile.from_int(
         self.features, limit=MOCK_APP_FEATURES_LIMIT)
     self._test_profile_values(profile)
コード例 #4
0
 def test_from_int(self):
     profile = FeatureProfile.from_int(self.features)
     self._test_profile(profile)
コード例 #5
0
ファイル: test_features.py プロジェクト: sunbiz/zamboni
 def test_from_int(self):
     profile = FeatureProfile.from_int(self.features)
     self._test_profile(profile)
コード例 #6
0
ファイル: test_features.py プロジェクト: Fjoerfoks/zamboni
 def test_to_base64(self):
     profile = FeatureProfile.from_int(self.features)
     signature = profile.to_base64_signature()
     eq_(signature, self.base64_signature)
コード例 #7
0
 def test_from_int_limit(self):
     profile = FeatureProfile.from_int(self.features,
                                       limit=MOCK_APP_FEATURES_LIMIT)
     self._test_profile_values(profile)
コード例 #8
0
 def test_to_base64(self):
     profile = FeatureProfile.from_int(self.features)
     signature = profile.to_base64_signature()
     eq_(signature, self.base64_signature)