Did I find the right examples for you? yes no

All Samples(56)  |  Call(48)  |  Derive(0)  |  Import(8)

src/d/j/django-adminactions-0.4/tests/test_exports.py   django-adminactions(Download)
from django_dynamic_fixture import G
from django.contrib.auth.models import User
from .utils import user_grant_permission, admin_register, CheckSignalsMixin, SelectRowsMixin
 
__all__ = ['ExportAsCsvTest', 'ExportAsFixtureTest', 'ExportAsCsvTest', 'ExportDeleteTreeTest',
    def test_no_permission(self):
        with user_grant_permission(self.user, ['auth.change_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']
    def test_success(self):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_export_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']
    def test_add_foreign_keys(self):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_export_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']
    def _run_action(self, steps=2):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_export_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            if steps >= 1:

src/d/j/django-adminactions-HEAD/tests/test_exports.py   django-adminactions(Download)
from django_dynamic_fixture import G
from django.contrib.auth.models import User
from .utils import user_grant_permission, admin_register, CheckSignalsMixin, SelectRowsMixin
 
__all__ = ['ExportAsCsvTest', 'ExportAsFixtureTest', 'ExportAsCsvTest', 'ExportDeleteTreeTest',
    def test_no_permission(self):
        with user_grant_permission(self.user, ['auth.change_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']
    def test_success(self):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_export_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']
    def test_add_foreign_keys(self):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_export_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']
    def _run_action(self, steps=2):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_export_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            if steps >= 1:

src/d/j/django-adminactions-0.4/tests/test_graph.py   django-adminactions(Download)
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django_dynamic_fixture import G
from django_webtest import WebTest
from .utils import CheckSignalsMixin, user_grant_permission, SelectRowsMixin
    def _run_action(self, steps=2):
        with user_grant_permission(self.user, ['auth.change_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            if steps >= 1:

src/d/j/django-adminactions-HEAD/tests/test_graph.py   django-adminactions(Download)
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django_dynamic_fixture import G
from django_webtest import WebTest
from .utils import CheckSignalsMixin, user_grant_permission, SelectRowsMixin
    def _run_action(self, steps=2):
        with user_grant_permission(self.user, ['auth.change_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            if steps >= 1:

src/d/j/django-adminactions-0.4/tests/test_mass_update.py   django-adminactions(Download)
from django_webtest import WebTestMixin
from django.test import TransactionTestCase
from .utils import CheckSignalsMixin, user_grant_permission, SelectRowsMixin
 
 
    def _run_action(self, steps=2, **kwargs):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_massupdate_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            if steps >= 1:
    def test_no_permission(self):
        with user_grant_permission(self.user, ['auth.change_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']

src/d/j/django-adminactions-HEAD/tests/test_mass_update.py   django-adminactions(Download)
from django_webtest import WebTestMixin
from django.test import TransactionTestCase
from .utils import CheckSignalsMixin, user_grant_permission, SelectRowsMixin
 
 
    def _run_action(self, steps=2, **kwargs):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_massupdate_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            if steps >= 1:
    def test_no_permission(self):
        with user_grant_permission(self.user, ['auth.change_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']

src/d/j/django-adminactions-0.4/tests/test_merge.py   django-adminactions(Download)
from .common import BaseTestCaseMixin
from .utils import SelectRowsMixin
from .utils import user_grant_permission
 
PROFILE_MODULE = getattr(settings, 'AUTH_PROFILE_MODULE', 'demoapp.UserProfile')
    def _run_action(self, steps=3, page_start=None):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_merge_user']):
            if isinstance(steps, int):
                steps = range(1, steps + 1)
                res = self.app.get('/', user='user')
    def test_no_permission(self):
        with user_grant_permission(self.user, ['auth.change_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']
    def test_error_if_too_many_records(self):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_merge_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']
    def test_swap(self):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_merge_user']):
            #removed = User.objects.get(pk=self._selected_rows[0])
            #preserved = User.objects.get(pk=self._selected_rows[1])
 

src/d/j/django-adminactions-HEAD/tests/test_merge.py   django-adminactions(Download)
from .common import BaseTestCaseMixin
from .utils import SelectRowsMixin
from .utils import user_grant_permission
 
PROFILE_MODULE = getattr(settings, 'AUTH_PROFILE_MODULE', 'demoapp.UserProfile')
    def _run_action(self, steps=3, page_start=None):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_merge_user']):
            if isinstance(steps, int):
                steps = range(1, steps + 1)
                res = self.app.get('/', user='user')
    def test_no_permission(self):
        with user_grant_permission(self.user, ['auth.change_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']
    def test_error_if_too_many_records(self):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_merge_user']):
            res = self.app.get('/', user='user')
            res = res.click('Users')
            form = res.forms['changelist-form']
    def test_swap(self):
        with user_grant_permission(self.user, ['auth.change_user', 'auth.adminactions_merge_user']):
            #removed = User.objects.get(pk=self._selected_rows[0])
            #preserved = User.objects.get(pk=self._selected_rows[1])