'Ensures that permissions are set on the group as specified.'

def test_permissions(self):

    self.check_groups([])
    call_command('manage_group', TEST_GROUP, '--permissions', 'auth:Group:add_group')
    self.check_groups([TEST_GROUP])
    self.check_permissions(TEST_GROUP, ['add_group'])
    call_command('manage_group', TEST_GROUP, '--permissions', 'auth:Group:add_group')
    self.check_groups([TEST_GROUP])
    self.check_permissions(TEST_GROUP, ['add_group'])
    call_command('manage_group', TEST_GROUP, '--permissions', 'auth:Group:add_group', 'auth:Group:change_group')
    self.check_groups([TEST_GROUP])
    self.check_permissions(TEST_GROUP, ['add_group', 'change_group'])
    call_command('manage_group', TEST_GROUP, '--permissions', 'auth:Group:change_group')
    self.check_groups([TEST_GROUP])
    self.check_permissions(TEST_GROUP, ['change_group'])
    call_command('manage_group', TEST_GROUP)
    self.check_groups([TEST_GROUP])
    self.check_permissions(TEST_GROUP, [])
