Skip to content
Snippets Groups Projects
Open Test coverage
  • View options
  • Test coverage

  • View options
  • Open Issue created by Lennard Strohmeyer

    Durch die Umstrukturierungen der vergangenen Entwicklungsschritte ist die test coverage gesunken und einige Endpoints / Klassen sind besonders betroffen.

    Coverage Report:

    backend/__init__.py                                                                     3      0   100%
    backend/celery.py                                                                       9      0   100%
    backend/management/commands/check_and_apply_migrations.py                              48     16    67%   13, 20-24, 27, 30, 54-57, 70-73, 80, 83
    backend/middleware.py                                                                  25     15    40%   17-31, 35-37
    backend/role_permission.py                                                             13      1    92%   24
    backend/roles.py                                                                       19      0   100%
    backend/settings.py                                                                    87      1    99%   118
    backend/urls.py                                                                        30      8    73%   31, 34, 37, 42-45, 78
    backend/utils.py                                                                        8      1    88%   5
    consents/__init__.py                                                                    0      0   100%
    consents/admin.py                                                                       1      0   100%
    consents/apps.py                                                                        4      0   100%
    consents/migrations/0001_initial.py                                                     5      0   100%
    consents/migrations/0002_initial.py                                                     6      0   100%
    consents/migrations/0003_initial.py                                                     7      0   100%
    consents/migrations/0004_userconsents_active.py                                         4      0   100%
    consents/migrations/0005_remove_userconsents_provider_schema_and_more.py               16      7    56%   8-14
    consents/migrations/0006_alter_userconsents_verb_group.py                               5      0   100%
    consents/migrations/__init__.py                                                         0      0   100%
    consents/models.py                                                                     16      1    94%   21
    consents/serializers.py                                                               121     10    92%   14, 97-99, 102-104, 158-159, 186
    consents/tests/__init__.py                                                              0      0   100%
    consents/tests/tests_consent_operations.py                                            213     25    88%   524-672
    consents/tests/tests_create_provider_schema.py                                         17      0   100%
    consents/tests/tests_paused_data_recording.py                                          44      0   100%
    consents/tests/tests_third_party.py                                                   114      0   100%
    consents/urls.py                                                                        3      0   100%
    consents/views.py                                                                     357    144    60%   45, 62, 85, 110-120, 137-185, 203-213, 222-231, 247, 266, 276, 281, 343, 377, 386-393, 442-465, 483-505, 518-530, 542-554, 565-586, 597-642, 695-708, 718, 729, 753-765, 829-830
    data_disclosure/__init__.py                                                             0      0   100%
    data_disclosure/admin.py                                                                1      0   100%
    data_disclosure/apps.py                                                                 4      0   100%
    data_disclosure/migrations/0001_initial.py                                              5      0   100%
    data_disclosure/migrations/0002_initial.py                                              7      0   100%
    data_disclosure/migrations/__init__.py                                                  0      0   100%
    data_disclosure/models.py                                                              13      1    92%   21
    data_disclosure/pdf_report.py                                                          62     52    16%   11-14, 18-76, 80-90, 97-178
    data_disclosure/tasks.py                                                               61     36    41%   28-38, 44-48, 59-73, 83-93, 98-103, 108-110
    data_disclosure/tests.py                                                                1      0   100%
    data_disclosure/urls.py                                                                 3      0   100%
    data_disclosure/views.py                                                               67     38    43%   27-36, 51-56, 62-63, 74-85, 96-119, 134-152
    data_removal/__init__.py                                                                0      0   100%
    data_removal/admin.py                                                                   1      0   100%
    data_removal/apps.py                                                                    4      0   100%
    data_removal/migrations/0001_initial.py                                                 5      0   100%
    data_removal/migrations/0002_initial.py                                                 7      0   100%
    data_removal/migrations/__init__.py                                                     0      0   100%
    data_removal/models.py                                                                 13      1    92%   17
    data_removal/tests.py                                                                   1      0   100%
    data_removal/urls.py                                                                    3      0   100%
    data_removal/views.py                                                                  41     21    49%   16-18, 22-27, 31-37, 42-51, 61-79, 93-98
    manage.py                                                                              12      2    83%   12-13
    providers/__init__.py                                                                   0      0   100%
    providers/admin.py                                                                      1      0   100%
    providers/apps.py                                                                       4      0   100%
    providers/migrations/0001_initial.py                                                    6      0   100%
    providers/migrations/0002_initial.py                                                    7      0   100%
    providers/migrations/0003_remove_analyticstoken_active_verbs_and_more.py                5      0   100%
    providers/migrations/0004_rename_analyticstokenverbs_analyticstokenverb.py              4      0   100%
    providers/migrations/0005_alter_analyticstokenverb_verb.py                              4      0   100%
    providers/migrations/0006_analyticstoken_description_analyticstoken_image_path.py       4      0   100%
    providers/migrations/0007_providerschema_additional_lrs.py                              4      0   100%
    providers/migrations/0008_verb_remove_providerschema_essential_verbs_and_more.py       40     26    35%   16-86
    providers/migrations/__init__.py                                                        0      0   100%
    providers/models.py                                                                    81      8    90%   15, 29, 35, 49, 73, 87, 103, 112
    providers/serializers.py                                                               93     20    78%   59-61, 81-92, 95-104, 115-116, 119, 154
    providers/tests.py                                                                     64      2    97%   76-77
    providers/urls.py                                                                       3      0   100%
    providers/views.py                                                                    429    320    25%   92-117, 145-146, 158, 171-190, 201-204, 207-215, 230-253, 262-268, 271-290, 298-305, 317, 330-338, 349-360, 372-373, 377-386, 391-392, 406-445, 448-569, 580-623, 635-739, 755, 758, 761-861, 874-917, 930-948, 963-974
    settings/apps.py                                                                        4      0   100%
    settings/migrations/0001_initial.py                                                     5      0   100%
    settings/migrations/__init__.py                                                         0      0   100%
    settings/models.py                                                                      4      0   100%
    settings/urls.py                                                                        3      0   100%
    settings/views.py                                                                      25     16    36%   14-18, 21-25, 28-38
    ssoauth/__init__.py                                                                     5      0   100%
    ssoauth/app_settings/__init__.py                                                       19      1    95%   86
    ssoauth/app_settings/defaults.py                                                       40      0   100%
    ssoauth/apps.py                                                                        44      6    86%   23, 31, 40-41, 44-45
    ssoauth/auth_utils.py                                                                 108     90    17%   14-17, 22-28, 32-38, 48-85, 90-95, 100-108, 112-122, 126-128, 133, 138-169
    ssoauth/checks.py                                                                     102     22    78%   21-22, 32-36, 47-50, 59, 67, 79, 88, 93, 95, 97, 106-108, 117, 122, 133, 144
    ssoauth/extras/__init__.py                                                              0      0   100%
    ssoauth/extras/hsh_compat.py                                                           17      8    53%   11, 26-32
    ssoauth/management/__init__.py                                                          0      0   100%
    ssoauth/management/commands/__init__.py                                                 0      0   100%
    ssoauth/management/commands/ssoauth_setup_groups_and_perms.py                          43     17    60%   30-35, 39-42, 47-52, 70-71
    ssoauth/migrations/0001_initial.py                                                      7      0   100%
    ssoauth/migrations/0002_remove_usermapping_uuid.py                                      4      0   100%
    ssoauth/migrations/0003_usermapping_uid.py                                              4      0   100%
    ssoauth/migrations/__init__.py                                                          0      0   100%
    ssoauth/models.py                                                                       9      1    89%   13
    ssoauth/sso_utils.py                                                                   65     47    28%   15-20, 24-29, 35-65, 84-107
    ssoauth/views.py                                                                      240    168    30%   30-32, 39, 62-76, 80-82, 85-92, 104-109, 119-123, 126-129, 135-138, 150, 153-167, 171-176, 180-229, 241-245, 249-272, 279-285, 302-305, 309, 312-331, 334-368, 374-377, 380-383
    users/__init__.py                                                                       0      0   100%
    users/admin.py                                                                          1      0   100%
    users/apps.py                                                                           4      0   100%
    users/custom_tokens.py                                                                 13      0   100%
    users/managers.py                                                                      20      9    55%   15, 26-34
    users/migrations/0001_initial.py                                                        6      0   100%
    users/migrations/0002_customuser_general_privacy_policy.py                              4      0   100%
    users/migrations/0003_customuser_shibboleth_connector_identifier.py                     4      0   100%
    users/migrations/__init__.py                                                            0      0   100%
    users/models.py                                                                        28      4    86%   26, 35, 39, 48
    users/serializers.py                                                                   18      0   100%
    users/tests.py                                                                         52      0   100%
    users/urls.py                                                                           5      0   100%
    users/views.py                                                                        116     41    65%   39, 48, 54, 129-157, 164-170, 179-181, 191-193, 204-215, 225-226, 229-232
    xapi/__init__.py                                                                        0      0   100%
    xapi/admin.py                                                                           1      0   100%
    xapi/apps.py                                                                            4      0   100%
    xapi/migrations/__init__.py                                                             0      0   100%
    xapi/models.py                                                                          1      0   100%
    xapi/tasks.py                                                                           9      4    56%   7-10
    xapi/tests/__init__.py                                                                  0      0   100%
    xapi/tests/test_xapi_statement_validation.py                                           66     16    76%   41-42, 67-68, 90-91, 108-109, 130-131, 160-161, 195-196, 216-217
    xapi/tests/tests.py                                                                   241      7    97%   27, 112-113, 119-120, 222-223
    xapi/tests/tests_verb_id_validation.py                                                 56      1    98%   21
    xapi/urls.py                                                                            3      0   100%
    xapi/views.py                                                                         260    139    47%   51-58, 62-72, 76-113, 117-124, 138, 145, 152, 159, 167-169, 172, 175, 179, 184-185, 192, 211, 220, 238, 257, 274-296, 309, 321-322, 338-339, 362-385, 393, 400-401, 418, 454-509, 522-583
    -----------------------------------------------------------------------------------------------------------------
    TOTAL                                                                                3895   1353    65%

    Betroffene Endpoints / Routen, welche unzureichend abgedeckt sind:

    • consents:
      • provider/<provider_id>/verb-groups
      • provider-status/third-party
      • provider/create
        • Sonderfälle, falls kein Schema hochgeladen wurde, OSError und defektes JSON werden nicht getestet)
        • Erzeugung von essential verbs nicht vollständig abgedeckt
      • provider/<provider_id>/create-verb-group:
        • Edge case, falls ungültige Verben übermittelt werden, nicht abgedeckt
        • Fall des Aktualisierens einer bestehenden Gruppe nicht abgedeckt
      • user/<provider_id>
      • user/history
      • user/update-consent-group-active
      • user/revoke-consent-group
      • user/create
      • user/create-via-connect-service
      • user/analytics-tokens
      • user/analytics-tokens/consent
      • user/providers
      • user/status
      • user/status/<user_id>/third-party (Sonderfall, falls kein Consent existiert, nicht abgedeckt)
    • data-disclosure
      • komplett
    • data-removal
      • komplett
    • providers
      • analytics-tokens/create teilweise
      • analytics-tokens/int:token_id/update-verbs
      • analytics-tokens/int:token_id/image
      • analytics-tokens/int:token_id/image/<image_name>
      • analytics-tokens/int:pk/delete
      • analytics-tokens/name-available
      • data
      • storeanalyticsengineresult
      • geteanalyticsengineresult
      • geteanalyticsengineresults
      • createvisualizationtoken
      • resultsretention
      • addengineaccess
    • settings
    • ssoauth generell (wie testen wir das?)
    • users
      • mergeData
      • users
      • groups
      • permissions (evtl raus nehmen?)
      • user/<user_id>/permissions
      • accept-privacy-policy
    • xapi: diverse edge cases und Verzweigungen sind aktuell nicht erfasst, siehe coverage report

    Weitere betroffene Codestellen (niedrige Priorität):

    • backend
      • /app/de redirect, angular render Routen
      • get_static_text
      • redoc
    • users
      • views: edge cases abdecken (z.B. z.39)
      • managers: Edge case, falls keine Mail gesetzt ist, und Erstellen von superusern
    0 of 55 checklist items completed
    • Merge request
    • Branch

    Linked items 0

  • Link items together to show that they're related or that one is blocking others.

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading