Skip to content

Commit 4af1d0e

Browse files
committed
Updated tests
1 parent 8a8842e commit 4af1d0e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

examples/example.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
""" FlaskValidator example """
22

33
from flask import Flask
4-
from flask.ext.sqlalchemy import SQLAlchemy
4+
from flask_sqlalchemy import SQLAlchemy
55
from flask_validator import ValidateInteger, ValidateString
66

77
app = Flask(__name__)

test/test_constraint.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
ValidateNumber
99
import unittest
1010
from flask import Flask
11-
from flask.ext.sqlalchemy import SQLAlchemy
12-
11+
from flask_sqlalchemy import SQLAlchemy
1312

1413
class ConstraintTest(unittest.TestCase):
1514
def setUp(self):
1615
app = Flask(__name__)
1716
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
17+
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
1818
db = SQLAlchemy(app)
1919

2020
class DummyModel(db.Model):
@@ -274,7 +274,7 @@ def test_timezone(self):
274274
Testing Timezone
275275
"""
276276

277-
self.simple_validate('timezone', 'US/Pacific-New', "NotTZ")
277+
self.simple_validate('timezone', 'GMT', "NotTZ")
278278

279279
def test_timezone_brit(self):
280280
"""
@@ -289,6 +289,7 @@ def test_creditcard(self):
289289
"""
290290

291291
self.simple_validate('creditcard', '4111 1111 1111 1111', "202")
292+
self.simple_validate('creditcard', '4111-1111-1111-1111', "11111")
292293

293294
def test_currency(self):
294295
"""

0 commit comments

Comments
 (0)