Skip to content

Commit 1bfaa4d

Browse files
author
Takashi Matsuo
committed
Merge pull request #95 from GoogleCloudPlatform/test-reorg
Re-organizing tests to be beside the samples they test.
2 parents 75969d8 + 64d99cd commit 1bfaa4d

33 files changed

+46
-35
lines changed

appengine/bigquery/tests/test_appengine_auth.py renamed to appengine/bigquery/main_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
import re
1717

1818
from apiclient.http import HttpMock
19-
from appengine.bigquery import main
2019
import mock
2120
import tests
2221
import webtest
2322

23+
from . import main
24+
2425

2526
class TestAuthSample(tests.AppEngineTestbedCase):
2627

appengine/bigquery/tests/__init__.py

Whitespace-only changes.

appengine/images/tests/test_guestbook.py renamed to appengine/images/main_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# from the app main.py
16-
from appengine.images import main
1715
import mock
1816
from tests import AppEngineTestbedCase
1917
import webtest
2018

19+
from . import main
20+
2121

2222
class TestHandlers(AppEngineTestbedCase):
2323
def setUp(self):

appengine/images/tests/__init__.py

Whitespace-only changes.

appengine/ndb/overview/tests/test_overview.py renamed to appengine/memcache/guestbook/main_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# from the app main.py
16-
from appengine.ndb.overview import main
1715
from tests import AppEngineTestbedCase
1816
import webtest
1917

18+
from . import main
19+
2020

2121
class TestHandlers(AppEngineTestbedCase):
22+
2223
def test_hello(self):
2324
app = webtest.TestApp(main.app)
2425
response = app.get('/')

appengine/memcache/guestbook/tests/__init__.py

Whitespace-only changes.

appengine/ndb/modeling/tests/test_contact_with_group_models.py renamed to appengine/ndb/modeling/contact_with_group_models_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515
"""Test classes for code snippet for modeling article."""
1616

17-
from appengine.ndb.modeling import contact_with_group_models as models
1817
from google.appengine.ext import ndb
1918
from tests import AppEngineTestbedCase
2019

20+
from . import contact_with_group_models as models
21+
2122

2223
class ContactTestCase(AppEngineTestbedCase):
2324
"""A test case for the Contact model with groups."""

appengine/ndb/modeling/tests/test_keyproperty_models.py renamed to appengine/ndb/modeling/keyproperty_models_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616

1717
import unittest
1818

19-
from appengine.ndb.modeling import keyproperty_models as models
2019
from tests import AppEngineTestbedCase
2120

21+
from . import keyproperty_models as models
22+
2223

2324
class ContactTestCase(AppEngineTestbedCase):
2425
"""A test case for the Contact model class with KeyProperty."""

appengine/ndb/modeling/tests/test_naive_models.py renamed to appengine/ndb/modeling/naive_models_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414

1515
"""Test classes for code snippet for modeling article."""
1616

17-
from appengine.ndb.modeling import naive_models as models
1817
from tests import AppEngineTestbedCase
1918

19+
from . import naive_models as models
20+
2021

2122
class ContactTestCase(AppEngineTestbedCase):
2223
"""A test case for the naive Contact model classe."""

appengine/ndb/modeling/tests/test_parent_child_models.py renamed to appengine/ndb/modeling/parent_child_models_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515
"""Test classes for code snippet for modeling article."""
1616

17-
from appengine.ndb.modeling import parent_child_models as models
1817
from google.appengine.ext import ndb
1918
from tests import AppEngineTestbedCase
2019

20+
from . import parent_child_models as models
21+
2122

2223
class ContactTestCase(AppEngineTestbedCase):
2324
"""A test case for the Contact model class with KeyProperty."""

0 commit comments

Comments
 (0)