Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8780751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:08:03+00:00 2026-06-13T20:08:03+00:00

After searching and even reading the documentation on app engine unit testing am still

  • 0

After searching and even reading the documentation on app engine unit testing am still unable to make it work on my project.

The task is simple, I have my models and request handlers in main.py.
I have installed gaetestbed and included it on my test class.

My tests class looks like this;

from main import CloudDocument   # My model
class TestCloudDocument(DataStoreTestCase, unittest.TestCase):
    def test_find_document(self):
        self.assertEqual(CloudDocument.all().count(), 0)

When i run the above test it returns True yet my datastore has records, i would have expected this test to fail.

It seems like the test class does not see the datastore of my application. How can i make it
see and access my local datastore?

Gath

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:08:03+00:00Added an answer on June 13, 2026 at 8:08 pm

    Unit tests run in an isolated environment, with their own local datastore. Only the records you add in your test or in your setUp function will be present.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After searching online and reading the Oracle documentation for this, I need some help
Even after searching PhoneGap's website and their support group, I still cannot find an
After searching in the Net for about 4 hours I still don't understand Async
After extensive searching on this matter, I have been unable to find an answer
I'm struggling with the right type of conditional select statement here, even after searching.
After searching and reading a little bit I came up with the following SQL
I have a feeling the answer is no after reading through documentation. However, I
After searching the developer docs, google and other sites I still can't find how
I'm trying to render html in an email and even after searching the web,
Having trouble getting my form to UPDATE records in my database even after searching

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.