File: test-mongoengine

package info (click to toggle)
python-mongoengine 0.29.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 908 kB
  • sloc: python: 7,194; makefile: 57; sh: 17
file content (26 lines) | stat: -rw-r--r-- 425 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

set -e

cd "${AUTOPKGTEST_TMP}"

cat <<EOF > test_mongo.py
from mongoengine import *
import pymongo
import pymongo.database

connect('mongo_test')

conn = get_connection()
assert isinstance(conn, pymongo.MongoClient)

db = get_db()
assert isinstance(db, pymongo.database.Database)
assert db.name == 'mongo_test'

EOF

for py in $(py3versions --supported); do
    echo "[*] testing $py:"
    $py test_mongo.py
done