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

uw-it-aca / bridge-sis-provisioner / 12309653263

13 Dec 2024 04:34AM UTC coverage: 95.504% (-0.2%) from 95.666%
12309653263

Pull #249

github

web-flow
Merge 9ad494553 into 5c432cbcf
Pull Request #249: Turn off Command Error, more readable email msg

24 of 39 new or added lines in 5 files covered. (61.54%)

19 existing lines in 3 files now uncovered.

2995 of 3136 relevant lines covered (95.5%)

0.96 hits per line

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

95.83
/sis_provisioner/account_managers/customgrp_bridge.py
1
# Copyright 2024 UW-IT, University of Washington
2
# SPDX-License-Identifier: Apache-2.0
3

4
import logging
1✔
5
import traceback
1✔
6
from sis_provisioner.dao.pws import get_person
1✔
7
from sis_provisioner.account_managers.gws_bridge import GwsBridgeLoader
1✔
8
from sis_provisioner.dao.gws import get_additional_users
1✔
9
from sis_provisioner.util.log import log_exception
1✔
10

11
logger = logging.getLogger(__name__)
1✔
12

13

14
class CustomGroupLoader(GwsBridgeLoader):
1✔
15
    """
16
    This class will validate custom group members
17
    1. If the user is not in DB, add to Bridge
18
    2. Update active accounts.
19
    """
20

21
    def __init__(self, worker, clogger=logger):
1✔
22
        super(CustomGroupLoader, self).__init__(worker, clogger)
1✔
23
        self.data_source = "Custom group"
1✔
24

25
    def update_existing_accs(self):
1✔
26
        return False
1✔
27

28
    def fetch_users(self):
1✔
29
        user_list = []
1✔
30
        for uwnetid in list(get_additional_users()):
1✔
31
            try:
1✔
32
                p = get_person(uwnetid)
1✔
33
                if p.is_emp_state_current() or p.is_stud_state_current():
1✔
34
                    continue
1✔
NEW
35
                user_list.append(uwnetid)
×
36
            except Exception:
1✔
37
                log_exception(
1✔
38
                    logger, f"get_person_by_netid({uwnetid})",
39
                    traceback.format_exc(chain=False)
40
                )
41
        return user_list
1✔
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

© 2025 Coveralls, Inc