| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,6 +7,7 @@ localdeps = | |||
| 7 | 7 | pip install --quiet --upgrade {toxinidir}/../core | |
| 8 | 8 | deps = | |
| 9 | 9 | {toxinidir}/../core | |
| 10 | + mock | ||
| 10 | 11 | pytest | |
| 11 | 12 | covercmd = | |
| 12 | 13 | py.test --quiet \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,6 +14,13 @@ | |||
| 14 | 14 | ||
| 15 | 15 | import unittest | |
| 16 | 16 | ||
| 17 | + import mock | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + def _make_credentials(): | ||
| 21 | + import google.auth.credentials | ||
| 22 | + return mock.Mock(spec=google.auth.credentials.Credentials) | ||
| 23 | + | ||
| 17 | 24 | ||
| 18 | 25 | class TestClient(unittest.TestCase): | |
| 19 | 26 | ||
@@ -28,7 +35,7 @@ def _make_one(self, *args, **kw): | |||
| 28 | 35 | def test_config(self): | |
| 29 | 36 | PROJECT = 'PROJECT' | |
| 30 | 37 | CONFIG_NAME = 'config_name' | |
| 31 | - creds = object() | ||
| 38 | + creds = _make_credentials() | ||
| 32 | 39 | ||
| 33 | 40 | client_obj = self._make_one(project=PROJECT, credentials=creds) | |
| 34 | 41 | new_config = client_obj.config(CONFIG_NAME) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments