Beispiel #1
0
    def test_existing_bobo_traverse(self):
        manage_addFancyContent(self.folder, 'fancy', '')

        # check if the old bobo_traverse method can still kick in
        response = self.publish('/test_folder_1_/fancy/something-else')
        self.assertEquals('something-else', response.getBody())

        # check if z3-based view lookup works
        response = self.publish('/test_folder_1_/fancy/fancy')
        self.assertEquals("Fancy, fancy", response.getBody())
Beispiel #2
0
    def test_existing_bobo_traverse(self):
        manage_addFancyContent(self.folder, 'fancy', '')

        # check if the old bobo_traverse method can still kick in
        response = self.publish('/test_folder_1_/fancy/something-else')
        self.assertEquals('something-else', response.getBody())

        # even though we have a zope 3 view registered as 'fancy', it
        # doesn't kick in, the existing bobo_traverse takes over
        # everything
        response = self.publish('/test_folder_1_/fancy/fancy')
        self.assertEquals("fancy", response.getBody())
Beispiel #3
0
 def test_get_size_on_original_and_fallback(self):
     manage_addFancyContent(self.folder, 'fancy', 'Fancy')
     obj = self.folder.fancy
     self.assertEquals(obj.get_size(), 43)