Coveralls logob
Coveralls logo
  • Home
  • Features
  • Pricing
  • Docs
  • Sign In

matrix-org / synapse / 4532

23 Sep 2019 - 19:39 coverage decreased (-49.7%) to 17.596%
4532

Pull #6079

buildkite

Richard van der Hoff
update changelog
Pull Request #6079: Add submit_url response parameter to msisdn /requestToken

359 of 12986 branches covered (2.76%)

Branch coverage included in aggregate %.

0 of 7 new or added lines in 1 file covered. (0.0%)

18869 existing lines in 281 files now uncovered.

8809 of 39116 relevant lines covered (22.52%)

0.23 hits per line

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

41.67
/synapse/config/third_party_event_rules.py
1
# -*- coding: utf-8 -*-
2
# Copyright 2019 The Matrix.org Foundation C.I.C.
3
#
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
# you may not use this file except in compliance with the License.
6
# You may obtain a copy of the License at
7
#
8
#     http://www.apache.org/licenses/LICENSE-2.0
9
#
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15

16
from synapse.util.module_loader import load_module
1×
17

18
from ._base import Config
1×
19

20

21
class ThirdPartyRulesConfig(Config):
1×
22
    def read_config(self, config, **kwargs):
1×
UNCOV
23
        self.third_party_event_rules = None
!
24

UNCOV
25
        provider = config.get("third_party_event_rules", None)
!
UNCOV
26
        if provider is not None:
Branches [[0, 22], [0, 27]] missed. !
27
            self.third_party_event_rules = load_module(provider)
!
28

29
    def generate_config_section(self, **kwargs):
1×
30
        return """\
!
31
        # Server admins can define a Python module that implements extra rules for
32
        # allowing or denying incoming events. In order to work, this module needs to
33
        # override the methods defined in synapse/events/third_party_rules.py.
34
        #
35
        # This feature is designed to be used in closed federations only, where each
36
        # participating server enforces the same rules.
37
        #
38
        #third_party_event_rules:
39
        #  module: "my_custom_project.SuperRulesSet"
40
        #  config:
41
        #    example_option: 'things'
42
        """
Troubleshooting · Open an Issue · Sales · Support · ENTERPRISE · CAREERS · STATUS
BLOG · TWITTER · Legal & Privacy · Supported CI Services · What's a CI service? · Automated Testing

© 2019 Coveralls, LLC