Commit 756b9412 authored by antoine.lizee's avatar antoine.lizee

ref: move test-skipping logic to the __init__ file for the mongoengine tests

parent 2e107edc
import sys
from flask import Flask
from nose.plugins.skip import SkipTest
from flask_admin import Admin
from flask_admin._compat import PY2
# Skip test on PY3
if not PY2:
raise SkipTest('The MongoEngine integration is not Python 3 compatible')
# Skip test on Python 2.6 since it is still supported by flask-admin:
if sys.version_info[0] == 2 and sys.version_info[1] == 6:
raise SkipTest('MongoEngine is not Python 2.6 compatible as of its 0.11 version.')
from flask_mongoengine import MongoEngine
......
from nose.tools import eq_, ok_
from nose.plugins.skip import SkipTest
# Skip test on PY3
from flask_admin._compat import PY2, as_unicode
if not PY2:
raise SkipTest('MongoEngine is not Python 3 compatible')
# Skip test on Python 2.6 since it is still supported by flask-admin:
import sys
if sys.version_info[0] == 2 and sys.version_info[1] == 6:
raise SkipTest('MongoEngine is not Python 2.6 compatible as of its 0.11 version.')
from datetime import datetime
from nose.tools import eq_, ok_
from wtforms import fields, validators
from flask_admin import form
from flask_admin._compat import as_unicode
from flask_admin.contrib.mongoengine import ModelView
from . import setup
from datetime import datetime
class CustomModelView(ModelView):
def __init__(self, model,
name=None, category=None, endpoint=None, url=None,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment