forked from googleapis/python-spanner-django
-
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.
Merge pull request #6 from googleapis/master
feat: update docs and nox file to compile it (googleapis#610)
- Loading branch information
Showing
10 changed files
with
137 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
div#python2-eol { | ||
border-color: red; | ||
border-width: medium; | ||
} | ||
|
||
/* Ensure minimum width for 'Parameters' / 'Returns' column */ | ||
dl.field-list > dt { | ||
min-width: 100px | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Schema API | ||
===================== | ||
|
||
.. automodule:: django_spanner.schema | ||
:members: | ||
:inherited-members: | ||
|
||
|
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,4 @@ | ||
Schema | ||
#################################### | ||
|
||
[this page is under construction] |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright 2020 Google LLC | ||
# | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file or at | ||
# https://developers.google.com/open-source/licenses/bsd | ||
|
||
import sys | ||
import unittest | ||
import os | ||
|
||
|
||
@unittest.skipIf( | ||
sys.version_info < (3, 6), reason="Skipping Python versions <= 3.5" | ||
) | ||
class TestClient(unittest.TestCase): | ||
PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] | ||
INSTANCE_ID = "instance_id" | ||
DATABASE_ID = "database_id" | ||
USER_AGENT = "django_spanner/2.2.0a1" | ||
OPTIONS = {"option": "dummy"} | ||
|
||
settings_dict = { | ||
"PROJECT": PROJECT, | ||
"INSTANCE": INSTANCE_ID, | ||
"NAME": DATABASE_ID, | ||
"user_agent": USER_AGENT, | ||
"OPTIONS": OPTIONS, | ||
} | ||
|
||
def _get_target_class(self): | ||
from django_spanner.client import DatabaseClient | ||
|
||
return DatabaseClient | ||
|
||
def _make_one(self, *args, **kwargs): | ||
return self._get_target_class()(*args, **kwargs) | ||
|
||
def test_runshell(self): | ||
from google.cloud.spanner_dbapi.exceptions import NotSupportedError | ||
|
||
db_wrapper = self._make_one(self.settings_dict) | ||
|
||
with self.assertRaises(NotSupportedError): | ||
db_wrapper.runshell(parameters=self.settings_dict) |