-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fccf292
commit 2eb4496
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: UTF-8 -*- | ||
|
||
import pytest | ||
|
||
from zammadoo import APIException | ||
|
||
|
||
def test_server_version(rclient): | ||
version = rclient.server_version.split(".") | ||
assert version[:2] == ["6", "1"] | ||
|
||
|
||
def test_raise_if_user_cannot_be_found(rclient): | ||
with pytest.raises(APIException) as exc: | ||
rclient.users(100).reload() | ||
|
||
assert exc.match("Couldn't find User") | ||
assert exc.value.response.status_code == 404 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GET https://localhost/api/v1/users/100 404 {"error":"Couldn't find User with 'id'=100","error_human":"Couldn't find User with 'id'=100"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
from weakref import getweakrefcount, ref | ||
|
||
import pytest | ||
|
||
from conftest import resource | ||
|
||
|
||
|