def _run_transmogrifier(self):
     transmogrifier = TestTransmogrifier()
     transmogrifier.context = self.portal
     options = {'blueprint':
                'ftw.blueprints.linguaploneitemtranslationlinker'}
     source = self.klass(transmogrifier, 'test', options, self.items)
     return list(source)
Beispiel #2
0
 def _run_transmogrifier(self):
     transmogrifier = TestTransmogrifier()
     transmogrifier.context = self.portal
     options = {
         'blueprint': 'ftw.blueprints.linguaploneitemtranslationlinker'
     }
     source = self.klass(transmogrifier, 'test', options, self.items)
     return list(source)
Beispiel #3
0
    def test_unicode_encapsulating(self):
        self.input_data['text'] = u'foo'

        source = self.klass(TestTransmogrifier(), 'test',
                            self.options, [self.input_data])
        output = iter(source).next()
        self.assertEqual('text/plain', output['text'].getContentType())
Beispiel #4
0
    def assert_result(self, options, expected, input_data=None, klass=None):
        inserter = klass or self.klass
        input_data = input_data or self.input_data
        input_data = [input_data.copy()]
        source = inserter(TestTransmogrifier(), 'test', options, input_data)
        output = list(source)

        self.maxDiff = None
        self.assertEqual(output, expected)
 def run_transmogrifier(self, items):
     transmogrifier = TestTransmogrifier()
     transmogrifier.context = self.portal
     options = {'blueprint': 'ftw.blueprints.positionupdater'}
     source = self.klass(transmogrifier, 'test', options, items)
     return list(source)
Beispiel #6
0
 def run_transmogrifier(self, items):
     transmogrifier = TestTransmogrifier()
     transmogrifier.context = self.portal
     options = {'blueprint': 'ftw.blueprints.positionupdater'}
     source = self.klass(transmogrifier, 'test', options, items)
     return list(source)