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 p01.neo4jstub

How to install p01.neo4jstub

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install p01.neo4jstub
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.5.0 Available View build log
Linux (64-bit)
0.5.0 Available View build log
 
License
ZPL 2.1
Dependencies
Lastest release
version 0.5.0 on Jul 5th, 2013

This package provides a neo4j server stub setup based on a real neo4j server.

README

setup

This test is using a neo4j server. The test setUp method used for this test is calling our startNeo4jServer method which is starting a neo4j server. The first time this test get called a new neo4j server will get downloaded. The test setup looks like:

def test_suite():
    return unittest.TestSuite((
        doctest.DocFileSuite('README.txt',
            setUp=testing.doctestSetUp, tearDown=testing.doctestTearDown,
            optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
            encoding='utf-8'),
        ))

Your setup with a custom conf folder could look like:

def mySetUp(test):
    # setup neo4j server
    here = os.path.dirname(__file__)
    sandbox = os.path.join(here, 'sandbox')
    confSource = os.path.join(here, 'conf')
    startNeo4jServer(sandbox, confSource=confSource)


def myTearDown(test):
    # tear down neo4j server
    here = os.path.dirname(__file__)
    sandbox = os.path.join(here, 'sandbox')
    stopNeo4jServer(sandbox)
    # do some custom teardown stuff here

Also see our test.py for a sample setup.

windows

On windows a service with the name p01_neo4jstub_testing get installed and removed during the test run. This is not nice but that's how neo4j can get stopped after starting. If soemthing fails and the service dosn't get removed, you can simply use the follwoingcommand for remove the service:

sc delete p01_neo4jstub_testing
testing

Let's setup a python httplib connection:

>>> import httplib
>>> conn = httplib.HTTPConnection('localhost', 47474)

and test the cluster state:

>>> conn.request('GET', '/db/data')
>>> response = conn.getresponse()
>>> response.status
302

CHANGES

0.5.0 (28-06-2013)
  • initial release

Subscribe to package updates

Last updated Jul 5th, 2013

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.