This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Introduction

Storm is a fast, small and powerful object-relational mapper. Try it to use in db-aware applications.

Effective unit-testing DB-models needed:

  • easy access to testing-DB inside testcases
  • setting up testing-DB before each test (and tear down after)

To help this unitstorm provides class ModelTestCase, that can be used both in unittest and nosetest testing frameworks.

Simple example

from unitstorm import ModelTestCase
from os import path

import models as model # models define somewhere else

class TestMyModel(ModelTestCase):
    dburi = 'postgres://test:test@localhost/test'

    fixtures = path.join(path.dirname(__file__), 'fixtures')

    fixture_setup = 'create.sql', 'filldata.sql'
    fixture_teardown = 'drop.sql'

    sql_setup = 'INSERT INTO my_model (id, name) VALUES (1, "foo");',\
        'INSERT INTO my_model (id, name) VALUES (2, "bar");'
    sql_teardown = 'DELETE FROM my_model WHERE id = 1;'

    def test_stub(self):
        assert self.store.get(model.MyModel, 1).name == "foo"

TODO more description (look sources)

dburi

db

store

fixtures

fixture_setup

fixture_teardown

sql_setup

sql_teardown

Execution order: fixture_setup, sql_setup, test, sql_teardown, fixture_teardown

Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
unitstorm-0.1.1.tar.gz (4.3 kB) Copy SHA256 Checksum SHA256 Source Jul 7, 2010

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting