Did I find the right examples for you? yes no

All Samples(124)  |  Call(124)  |  Derive(0)  |  Import(0)

src/i/o/ionyweb-0.3/ionyweb/administration/tests/website.py   ionyweb(Download)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        # If connected, should work
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        # If connected, should work
        self.client.login(username='admin', password='admin')
 
        response = self.client.get(url)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.context['edit'], False)
        url = test_reverse('wa-domain', args=[1])
        response = self.client.get(url)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.context['edit'], True)
 

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/website.py   ionyweb(Download)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        # If connected, should work
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        # If connected, should work
        self.client.login(username='admin', password='admin')
 
        response = self.client.get(url)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.context['edit'], False)
        url = test_reverse('wa-domain', args=[1])
        response = self.client.get(url)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.context['edit'], True)
 

src/i/o/ionyweb-0.3/ionyweb/administration/tests/pages.py   ionyweb(Download)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        self.client.login(username='admin', password='admin')
 
        # GET - list of pages
        response = self.client.get(url)
        self.assertContains(response, 'page_list')
        self.assertEqual(len(response.context['pages']), 91)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        self.client.login(username='admin', password='admin')
 
        # GET
        response = self.client.get(url)
        self.assertEqual(response.status_code, 400)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        self.client.login(username='admin', password='admin')

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/pages.py   ionyweb(Download)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        self.client.login(username='admin', password='admin')
 
        # GET - list of pages
        response = self.client.get(url)
        self.assertContains(response, 'page_list')
        self.assertEqual(len(response.context['pages']), 91)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        self.client.login(username='admin', password='admin')
 
        # GET
        response = self.client.get(url)
        self.assertEqual(response.status_code, 400)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        self.client.login(username='admin', password='admin')

src/i/o/ionyweb-0.3/ionyweb/administration/tests/actions.py   ionyweb(Download)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
        response = self.client.put(url)
        self.assertEqual(response.status_code, 403)
        response = self.client.post(url)
        self.assertEqual(response.status_code, 403)
        response = self.client.delete(url)
        self.assertEqual(response.status_code, 403)

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/actions.py   ionyweb(Download)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
        response = self.client.put(url)
        self.assertEqual(response.status_code, 403)
        response = self.client.post(url)
        self.assertEqual(response.status_code, 403)
        response = self.client.delete(url)
        self.assertEqual(response.status_code, 403)

src/i/o/ionyweb-0.3/ionyweb/administration/tests/plugins.py   ionyweb(Download)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        self.client.login(username='admin', password='admin')
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.get(url)
        self.assertEqual(response.status_code, 404)
 
        # Try to edit another website plugin
        arg = '%s%d' % (settings.HTML_ID_PLUGIN, 487)
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.get(url)
        self.assertEqual(response.status_code, 404)
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.post(url, {'text': '<p>Another value</p>'})
        self.assertEqual(response.status_code, 404)
 
        # 404 - Try to edit another website plugin
        arg = '%s%d' % (settings.HTML_ID_PLUGIN, 487)
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.post(url, {'text': '<p>Another value</p>'})
        self.assertEqual(response.status_code, 404)

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/plugins.py   ionyweb(Download)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        self.client.login(username='admin', password='admin')
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.get(url)
        self.assertEqual(response.status_code, 404)
 
        # Try to edit another website plugin
        arg = '%s%d' % (settings.HTML_ID_PLUGIN, 487)
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.get(url)
        self.assertEqual(response.status_code, 404)
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.post(url, {'text': '<p>Another value</p>'})
        self.assertEqual(response.status_code, 404)
 
        # 404 - Try to edit another website plugin
        arg = '%s%d' % (settings.HTML_ID_PLUGIN, 487)
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.post(url, {'text': '<p>Another value</p>'})
        self.assertEqual(response.status_code, 404)

src/i/o/ionyweb-0.3/ionyweb/administration/tests/layouts.py   ionyweb(Download)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        # If connected, should work
        self.client.login(username='admin', password='admin')
 
        response = self.client.get(url)
        self.assertEqual(response.status_code, 400)
        # No parameters
        response = self.client.get(url)
        self.assertEqual(response.status_code, 400)
 
        # Preview content
        # No parameters
        response = self.client.post(url)
        self.assertEqual(response.status_code, 400)
 
        # Edit

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/layouts.py   ionyweb(Download)
        self.client.logout()
        response = self.client.get(url)
        self.assertEqual(response.status_code, 403)
 
        # If connected, should work
        self.client.login(username='admin', password='admin')
 
        response = self.client.get(url)
        self.assertEqual(response.status_code, 400)
        # No parameters
        response = self.client.get(url)
        self.assertEqual(response.status_code, 400)
 
        # Preview content
        # No parameters
        response = self.client.post(url)
        self.assertEqual(response.status_code, 400)
 
        # Edit

  1 | 2  Next