Beispiel #1
0
    def test_validate_no_device_when_no_device_associated(self, line_get):
        line_get.return_value = Mock(LineSIP, device_id=None)

        validator.validate_no_device(sentinel.line_id)

        line_get.assert_called_once_with(sentinel.line_id)
Beispiel #2
0
def validate_dissociation(user_line):
    _validate_user_id(user_line)
    _validate_line_id(user_line)
    _validate_user_has_line(user_line)
    _is_allowed_to_dissociate(user_line)
    line_device_validator.validate_no_device(user_line.line_id)