Passed
Pull Request — master (#36)
by
unknown
01:27
created

TestRequester.test_wrong_url()   A

Complexity

Conditions 2

Size

Total Lines 8
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nop 1
1
from unittest import TestCase
2
3
from nextcloud.requester import Requester, NextCloudConnectionError
4
5
6
class TestRequester(TestCase):
7
8
    def test_wrong_url(self):
9
        req = Requester('http://wrong-url.wrong', 'user', 'password', json_output=True)
10
        exception_raised = False
11
        try:
12
            req.get('')
13
        except NextCloudConnectionError as e:
14
            exception_raised = True
15
        assert exception_raised
16
17