Exemplo n.º 1
0
 def test_create_with_name_starting_with_numeric(self):
     """Successfully create a group with name starting with numeric chars"""
     testgroup = GroupTracker(
         name=u'1234group',
         description=u'Group name starting with numeric chars',
     )
     testgroup.create()
     testgroup.delete()
Exemplo n.º 2
0
def managed_group(request, user):
    user.ensure_exists()
    tracker = GroupTracker(name=user.uid,
                           description=u'User private group for %s' % user.uid)
    tracker.exists = True
    # Managed group gets created when user is created
    tracker.track_create()
    return tracker
Exemplo n.º 3
0
def admins(request, xmlrpc_setup):
    # Track the admins group
    tracker = GroupTracker(name=u'admins',
                           description=u'Account administrators group')
    tracker.exists = True
    tracker.track_create()
    tracker.attrs.update(member_user=[u'admin'])
    return tracker
Exemplo n.º 4
0
def trustadmins(request):
    # Track the 'trust admins' group
    tracker = GroupTracker(name=u'trust admins',
                           description=u'Trusts administrators group')
    tracker.exists = True
    tracker.track_create()
    tracker.attrs.update(member_user=[u'admin'])
    return tracker
Exemplo n.º 5
0
def trustadmins(request):
    # Track the 'trust admins' group
    tracker = GroupTracker(
        name=u'trust admins', description=u'Trusts administrators group'
    )
    tracker.exists = True
    tracker.track_create()
    tracker.attrs.update(member_user=[u'admin'])
    return tracker
Exemplo n.º 6
0
def managed_group(request, user):
    user.ensure_exists()
    tracker = GroupTracker(
        name=user.uid, description=u'User private group for %s' % user.uid
    )
    tracker.exists = True
    # Managed group gets created when user is created
    tracker.track_create()
    return tracker
Exemplo n.º 7
0
def managed_group(request, user):
    user.ensure_exists()
    tracker = GroupTracker(name=user.uid,
                           description=u'User private group for %s' % user.uid)
    tracker.exists = True
    # Managed group gets created when user is created
    tracker.track_create()
    # Managed groups don't have a SID
    del tracker.attrs['ipantsecurityidentifier']
    return tracker
Exemplo n.º 8
0
 def test_create_with_numeric_only_group_name(self):
     """Try to create a group with name only contains numeric chars"""
     testgroup = GroupTracker(
         name=u'1234', description=u'Numeric only group name',
     )
     with raises_exact(errors.ValidationError(
         name='group_name',
         error=u'may only include letters, numbers, _, -, . and $',
     )):
         testgroup.create()
Exemplo n.º 9
0
 def test_create_with_numeric_only_group_name(self):
     """Try to create a group with name only contains numeric chars"""
     testgroup = GroupTracker(
         name=u'1234', description=u'Numeric only group name',
     )
     with raises_exact(errors.ValidationError(
         name='group_name',
         error=u'may only include letters, numbers, _, -, . and $',
     )):
         testgroup.create()
Exemplo n.º 10
0
 def test_create_with_name_starting_with_numeric(self):
     """Successfully create a group with name starting with numeric chars"""
     testgroup = GroupTracker(
         name=u'1234group',
         description=u'Group name starting with numeric chars',
     )
     testgroup.create()
     testgroup.delete()
Exemplo n.º 11
0
def group4(request):
    tracker = GroupTracker(name=u"testgroup4", description=u"Test desc4")
    return tracker.make_fixture(request)
Exemplo n.º 12
0
def group(request):
    tracker = GroupTracker(u'testgroup')
    return tracker.make_fixture(request)
Exemplo n.º 13
0
def defaultgroup1(request):
    tracker = GroupTracker(name=u'defaultgroup1',
                           description=u'Automember test defaultgroup1')
    return tracker.make_fixture(request)
Exemplo n.º 14
0
def group(request):
    tracker = GroupTracker(name=u'group1')
    return tracker.make_fixture(request)
Exemplo n.º 15
0
def group(request):
    tracker = GroupTracker(name=u'group1')
    return tracker.make_fixture(request)
Exemplo n.º 16
0
def group4(request, xmlrpc_setup):
    tracker = GroupTracker(name=u'testgroup4', description=u'Test desc4')
    return tracker.make_fixture(request)
Exemplo n.º 17
0
def group2(request):
    tracker = GroupTracker(name=u'testgroup2', description=u'Test desc2')
    return tracker.make_fixture(request)
Exemplo n.º 18
0
def defaultgroup1(request):
    tracker = GroupTracker(name=u'defaultgroup1',
                           description=u'Automember test defaultgroup1')
    return tracker.make_fixture(request)
Exemplo n.º 19
0
def group2(request):
    tracker = GroupTracker(name=u'testgroup2', description=u'Test desc2')
    return tracker.make_fixture(request)
Exemplo n.º 20
0
def group(request):
    tracker = GroupTracker(u'testgroup')
    return tracker.make_fixture(request)
Exemplo n.º 21
0
def group1(request, xmlrpc_setup):
    tracker = GroupTracker(name=u'tgroup1',
                           description=u'Automember test group1')
    return tracker.make_fixture(request)