• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tableau / tabcmd / 16737753891

05 Aug 2025 12:56AM UTC coverage: 84.502%. First build
16737753891

Pull #286

github

web-flow
Merge eaee839d8 into 9b227d4ed
Pull Request #286: Replace raw strings with translation calls

52 of 64 new or added lines in 10 files covered. (81.25%)

2301 of 2723 relevant lines covered (84.5%)

0.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.76
/tabcmd/commands/group/create_group_command.py
1
import tableauserverclient as TSC
1✔
2

3
from tabcmd.commands.auth.session import Session
1✔
4
from tabcmd.commands.constants import Errors
1✔
5
from tabcmd.commands.server import Server
1✔
6
from tabcmd.execution.localize import _
1✔
7
from tabcmd.execution.logger_config import log
1✔
8

9

10
class CreateGroupCommand(Server):
1✔
11
    """
12
    This command is used to create a group
13
    """
14

15
    name: str = "creategroup"
1✔
16
    description: str = _("creategroup.short_description")
1✔
17

18
    @staticmethod
1✔
19
    def define_args(create_group_parser):
1✔
20
        args_group = create_group_parser.add_argument_group(title=CreateGroupCommand.name)
1✔
21
        args_group.add_argument("name")
1✔
22

23
    @staticmethod
1✔
24
    def run_command(args):
1✔
25
        logger = log(__class__.__name__, args.logging_level)
1✔
26
        logger.debug(_("tabcmd.launching"))
1✔
27
        session = Session()
1✔
28
        server = session.create_session(args, logger)
1✔
29
        try:
1✔
30
            logger.info(_("creategroup.status").format(args.name))
1✔
31
            new_group = TSC.GroupItem(args.name)
1✔
32
            server.groups.create(new_group)
1✔
33
            logger.info(_("common.output.succeeded"))
1✔
34
        except Exception as e:
×
35
            if args.continue_if_exists and Errors.is_resource_conflict(e):
×
NEW
36
                logger.info(_("errors.xmlapi.already_exists").format(_("tabcmd.content_type.group"), args.name))
×
37
                return
×
38
            Errors.exit_with_error(logger, exception=e)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc