Commit 949924e5 authored by PJ Janse van Rensburg's avatar PJ Janse van Rensburg

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

This reverts commit 756b9412.
parent 0790ea5e
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 datetime import datetime
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 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