Exemple #1
0
 def test_fixEncodingRecurse(self):
     """Test the fixEncodingRecurse function"""
     for a, b in self.simple_values:
         self.assertEqual(koji.fixEncoding(a), b)
     for a, b in self.complex_values:
         self.assertEqual(koji.fixEncodingRecurse(a), b)
     for a, b in self.nonprint:
         self.assertEqual(
             koji.fixEncodingRecurse(a, remove_nonprintable=True), b)
 def test_fixEncodingRecurse(self):
     """Test the fixEncodingRecurse function"""
     if six.PY3:
         # don't test for py3
         return
     for a, b in self.simple_values:
         self.assertEqual(koji.fixEncoding(a), b)
     for a, b in self.complex_values:
         self.assertEqual(koji.fixEncodingRecurse(a), b)
     for a, b in self.nonprint:
         self.assertEqual(koji.fixEncodingRecurse(a, remove_nonprintable=True), b)
 def load_calls(self, name):
     fn = os.path.join(os.path.dirname(__file__), 'data/calls', name,
                       'calls.json')
     with open(fn) as fp:
         data = json.load(fp)
         data = koji.fixEncodingRecurse(data)
     for call in data:
         key = self._munge([call['method'], call['args'], call['kwargs']])
         self._testcalls[key] = call
Exemple #4
0
 def test_fixEncodingRecurse(self):
     """Test the fixEncodingRecurse function"""
     for a, b in self.simple_values:
         self.assertEqual(koji.fixEncoding(a), b)
     for a, b in self.complex_values:
         self.assertEqual(koji.fixEncodingRecurse(a), b)