forked from jpoullet2000/atlasclient
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug fix for __dir__ methods + basic token is now sent instead of (use…
…rname, password)
- Loading branch information
1 parent
9b876e9
commit 16e2041
Showing
7 changed files
with
44 additions
and
23 deletions.
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
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
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
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,2 +1,3 @@ | ||
six >=1.11.0 | ||
Click >=6.0 | ||
requests >=2.18.4 |
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,20 @@ | ||
try: | ||
from mock import MagicMock | ||
except ImportError: | ||
from unittest.mock import MagicMock | ||
|
||
from atlasclient.base import Model, QueryableModel | ||
from atlasclient.client import HttpClient | ||
|
||
class TestBase(): | ||
|
||
def test_model(self, monkeypatch): | ||
monkeypatch.setattr('atlasclient.base.QueryableModel', MagicMock(QueryableModel)) | ||
monkeypatch.setattr('atlasclient.client.HttpClient', MagicMock(HttpClient)) | ||
queryablemodel = QueryableModel | ||
httpclient = HttpClient | ||
queryablemodel.client = httpclient | ||
data = {'entity': {'createdBy': 'owner'}} | ||
model = Model(parent=queryablemodel, data=data) | ||
assert 'parent' in dir(model) | ||
assert model.identifier is None |
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
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