Did I find the right examples for you? yes no

All Samples(150)  |  Call(134)  |  Derive(0)  |  Import(16)

src/i/o/ionyweb-0.3/ionyweb/administration/tests/plugins.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.conf import settings
from ionyweb.administration.tests import test_reverse, AdministrationTests
from django.contrib.contenttypes.models import ContentType
 
class PluginViewTests(AdministrationTests):
    def test_plugins_view(self):
        url = test_reverse('wa-plugins')
        # Try to edit an existing plugin of the page
        arg = '%s%d' % (settings.HTML_ID_PLUGIN, 3)
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.get(url)
        self.assertContains(response, 'html')
 
        # Try to edit an existing plugin of another page
        arg = '%s%d' % (settings.HTML_ID_PLUGIN, 16)
        url = test_reverse('wa-plugin', args=[arg])
        # Try to edit a non existing plugin
        arg = '%s%d' % (settings.HTML_ID_PLUGIN, 9999)
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.get(url)
        self.assertEqual(response.status_code, 404)

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/plugins.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.conf import settings
from ionyweb.administration.tests import test_reverse, AdministrationTests
from django.contrib.contenttypes.models import ContentType
 
class PluginViewTests(AdministrationTests):
    def test_plugins_view(self):
        url = test_reverse('wa-plugins')
        # Try to edit an existing plugin of the page
        arg = '%s%d' % (settings.HTML_ID_PLUGIN, 3)
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.get(url)
        self.assertContains(response, 'html')
 
        # Try to edit an existing plugin of another page
        arg = '%s%d' % (settings.HTML_ID_PLUGIN, 16)
        url = test_reverse('wa-plugin', args=[arg])
        # Try to edit a non existing plugin
        arg = '%s%d' % (settings.HTML_ID_PLUGIN, 9999)
        url = test_reverse('wa-plugin', args=[arg])
        response = self.client.get(url)
        self.assertEqual(response.status_code, 404)

src/i/o/ionyweb-0.3/ionyweb/administration/tests/pages.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.conf import settings
from ionyweb.administration.tests import test_reverse, AdministrationTests
from django.contrib.contenttypes.models import ContentType
from ionyweb.page.models import Page
 
 
class PageViewTests(AdministrationTests):
    def test_pages_view(self):
        url = test_reverse('wa-pages')
    def test_page_layout_view(self):
        url = test_reverse('wa-page-layout')
 
        # If deconnected, shouldn't work
        self.client.logout()
    def test_get_page_view(self):
        url = test_reverse('wa-page')
 
        # If deconnected, shouldn't work
        self.client.logout()
 
        # GET - edit form
        url = test_reverse('wa-page', args=[1])
        response = self.client.get(url)
        self.assertContains(response, '<input id=\\"id_title\\" type=\\"text\\" name=\\"title\\" value=\\"Home\\" maxlength=\\"255\\" />')

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/pages.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.conf import settings
from ionyweb.administration.tests import test_reverse, AdministrationTests
from django.contrib.contenttypes.models import ContentType
from ionyweb.page.models import Page
 
 
class PageViewTests(AdministrationTests):
    def test_pages_view(self):
        url = test_reverse('wa-pages')
    def test_page_layout_view(self):
        url = test_reverse('wa-page-layout')
 
        # If deconnected, shouldn't work
        self.client.logout()
    def test_get_page_view(self):
        url = test_reverse('wa-page')
 
        # If deconnected, shouldn't work
        self.client.logout()
 
        # GET - edit form
        url = test_reverse('wa-page', args=[1])
        response = self.client.get(url)
        self.assertContains(response, '<input id=\\"id_title\\" type=\\"text\\" name=\\"title\\" value=\\"Home\\" maxlength=\\"255\\" />')

src/i/o/ionyweb-0.3/ionyweb/administration/tests/website.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.sites.models import Site
from ionyweb.administration.tests import test_reverse, AdministrationTests
 
    def test_domains_view(self):
        url = test_reverse('wa-domains')
 
        # If deconnected, shouldn't work
        self.client.logout()
    def test_domain_get_view(self):
        url = test_reverse('wa-domain')
 
        # If deconnected, shouldn't work
        self.client.logout()
        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)
 
        # If the site doesn't exists
        url = test_reverse('wa-domain', args=[10])

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/website.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.sites.models import Site
from ionyweb.administration.tests import test_reverse, AdministrationTests
 
    def test_domains_view(self):
        url = test_reverse('wa-domains')
 
        # If deconnected, shouldn't work
        self.client.logout()
    def test_domain_get_view(self):
        url = test_reverse('wa-domain')
 
        # If deconnected, shouldn't work
        self.client.logout()
        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)
 
        # If the site doesn't exists
        url = test_reverse('wa-domain', args=[10])

src/i/o/ionyweb-0.3/ionyweb/administration/tests/actions.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.conf import settings
from django.core.urlresolvers import NoReverseMatch
from ionyweb.administration.tests import test_reverse, AdministrationTests
 
        valid_url_action = 'item_list'
 
        url = test_reverse('wa-actions', args=[valid_html_id_plugin,
                                               valid_url_action])
 
        # Wrong prefix
        wrong_html_id_plugin = 'wrong-slug-1'
        url = test_reverse('wa-actions', args=[wrong_html_id_plugin,
                                               valid_url_action])
        response = self.client.get(url)
        # Plugin Relation Object doesn't exist
        html_id_plugin = '%s%d' % (settings.HTML_ID_PLUGIN, 10000)
        url = test_reverse('wa-actions', args=[html_id_plugin,
                                               valid_url_action])
        response = self.client.get(url)
        # App Object doesn't exist
        html_id_app = '%s%d' % (settings.HTML_ID_APP, 100000)
        url = test_reverse('wa-actions', args=[html_id_app,
                                               valid_url_action])
        response = self.client.get(url)

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/actions.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.conf import settings
from django.core.urlresolvers import NoReverseMatch
from ionyweb.administration.tests import test_reverse, AdministrationTests
 
        valid_url_action = 'item_list'
 
        url = test_reverse('wa-actions', args=[valid_html_id_plugin,
                                               valid_url_action])
 
        # Wrong prefix
        wrong_html_id_plugin = 'wrong-slug-1'
        url = test_reverse('wa-actions', args=[wrong_html_id_plugin,
                                               valid_url_action])
        response = self.client.get(url)
        # Plugin Relation Object doesn't exist
        html_id_plugin = '%s%d' % (settings.HTML_ID_PLUGIN, 10000)
        url = test_reverse('wa-actions', args=[html_id_plugin,
                                               valid_url_action])
        response = self.client.get(url)
        # App Object doesn't exist
        html_id_app = '%s%d' % (settings.HTML_ID_APP, 100000)
        url = test_reverse('wa-actions', args=[html_id_app,
                                               valid_url_action])
        response = self.client.get(url)

src/i/o/ionyweb-0.3/ionyweb/administration/tests/layouts.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.conf import settings
from ionyweb.administration.tests import test_reverse, AdministrationTests
 
class LayoutViewTests(AdministrationTests):
    def test_layouts_view(self):
        """Ensure the layouts view exists"""
        url = test_reverse('wa-layouts')
    def test_layout_view(self):
        # Test the preview
        url = test_reverse('wa-layout')
 
        self.client.login(username='admin', password='admin')

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/layouts.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.conf import settings
from ionyweb.administration.tests import test_reverse, AdministrationTests
 
class LayoutViewTests(AdministrationTests):
    def test_layouts_view(self):
        """Ensure the layouts view exists"""
        url = test_reverse('wa-layouts')
    def test_layout_view(self):
        # Test the preview
        url = test_reverse('wa-layout')
 
        self.client.login(username='admin', password='admin')

  1 | 2  Next