| Conditions | 2 |
| Total Lines | 11 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from unittest import TestCase |
||
| 8 | def test_wrong_url(self): |
||
| 9 | wrong_url = 'http://wrong-url.wrong' |
||
| 10 | req = Requester(wrong_url, 'user', 'password', json_output=False) |
||
| 11 | req.API_URL = '/wrong' |
||
| 12 | exception_raised = False |
||
| 13 | try: |
||
| 14 | req.get('') |
||
| 15 | except NextCloudConnectionError as e: |
||
| 16 | exception_raised = True |
||
| 17 | assert wrong_url in str(e) |
||
| 18 | assert exception_raised |
||
| 19 | |||
| 20 |