Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install gaetestbed

How to install gaetestbed

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install gaetestbed
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.12 Available View build log
Windows (64-bit)
0.12 Available View build log
Mac OS X (10.5+)
0.12 Available View build log
Linux (32-bit)
0.12 Available View build log
Linux (64-bit)
0.12 Available View build log
 
Author
License
GPL v2
Imports
Lastest release
version 0.12 on Jan 5th, 2011

This library provides a set of base test cases that can be mixed into your existing test cases.

They provide additional features to sandbox each test (by clearing the DataStore, Memcache, etc) and also add in additional assert style statements.

MailTestCase example:

System Message: WARNING/2 (<string>, line 8)

Literal block expected; none found.

import unittest from gaetestbed import MailTestCase

class MyTestCase(unittest.TestCase, MailTestCase): def test_email_sent(self): send_email_to('test@example.org') # Some method that sends e-mail... self.assertEmailSent(to='test@example.org') self.assertEqual(len(self.get_sent_messages()), 1)

MemcacheTestCase example:

System Message: WARNING/2 (<string>, line 19)

Literal block expected; none found.

import unittest from gaetestbed import MemcacheTestCase

class MyTestCase(unittest.TestCase, MemcacheTestCase): def test_memcache_gets_hit(self): self.assertMemcacheItems(0) self.assertMemcacheHits(0)

add_to_memcache('something', 'something') # Add something to memcache somehow... self.assertMemcacheItems(1) self.assertMemcacheHits(0)

get_page('/page_that_hits_memcache/') self.assertMemcacheItems(1) self.assertMemcacheHits(1)

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.