Created
April 26, 2010 21:40
-
-
Save backerman/379966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
# | |
# Self-contained test case for couchdbkit issue #9 | |
from couchdbkit import * | |
SERVER_URI="http://localhost:5984/" | |
DATABASE_NAME="kanji" | |
class Ship(Document): | |
shipClass = StringProperty() | |
shipName = StringProperty() | |
ships = [] | |
ships.append(Ship( | |
shipClass="General Systems Vehicle", | |
shipName="Sleeper Service")) | |
ships.append(Ship( | |
shipClass="General Contact Unit", | |
shipName="Very Little Gravitas Indeed" | |
)) | |
db = Server(uri=SERVER_URI).get_or_create_db(DATABASE_NAME) | |
db.bulk_save(ships) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment