Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
949924e5
Commit
949924e5
authored
Dec 26, 2016
by
PJ Janse van Rensburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "ref: move test-skipping logic to the __init__ file for the mongoengine tests"
This reverts commit
756b9412
.
parent
0790ea5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
17 deletions
+14
-17
__init__.py
flask_admin/tests/mongoengine/__init__.py
+0
-14
test_basic.py
flask_admin/tests/mongoengine/test_basic.py
+14
-3
No files found.
flask_admin/tests/mongoengine/__init__.py
View file @
949924e5
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
...
...
flask_admin/tests/mongoengine/test_basic.py
View file @
949924e5
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment