Class for autotests GoogleAppEngine python3 app.
Project description
Class for autotests GoogleAppEngine Python3 app.
Install
pip install test-helper-gae3
Usage in tests
import unittest
from google.appengine.ext import ndb
from test_helper_gae3 import TestGae3
class ModelTest(ndb.Model):
name = ndb.StringProperty(default='')
class TestCase(unittest.TestCase, TestGae3):
def setUp(self):
super().setUp()
TestGae3.set_up(self) # activate GAE testbed
def tearDown(self):
TestGae3.tear_down(self) # deactivate GAE testbed
super().tearDown()
def test_record_count(self):
self.check_db_tables([
(ModelTest, 0), # no records in ModelTest
])
ModelTest().put()
self.tester.check_db_tables([
(ModelTest, 1), # one record in ModelTest
])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
test_helper_gae3-1.1.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for test_helper_gae3-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 504d5a8091c335cadeb393d36e527c05730773cb7d09b8d27abd6f5323f210c3 |
|
MD5 | 8efe1ca50d4211eb7283ccce4625dea9 |
|
BLAKE2b-256 | a34b55b70ba2c26613648056de8b87b1b8290fc27aef803e872d01085c1f3b86 |