File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
""" FlaskValidator example """
2
2
3
3
from flask import Flask
4
- from flask . ext . sqlalchemy import SQLAlchemy
4
+ from flask_sqlalchemy import SQLAlchemy
5
5
from flask_validator import ValidateInteger , ValidateString
6
6
7
7
app = Flask (__name__ )
Original file line number Diff line number Diff line change 8
8
ValidateNumber
9
9
import unittest
10
10
from flask import Flask
11
- from flask .ext .sqlalchemy import SQLAlchemy
12
-
11
+ from flask_sqlalchemy import SQLAlchemy
13
12
14
13
class ConstraintTest (unittest .TestCase ):
15
14
def setUp (self ):
16
15
app = Flask (__name__ )
17
16
app .config ['SQLALCHEMY_DATABASE_URI' ] = 'sqlite:///:memory:'
17
+ app .config ['SQLALCHEMY_TRACK_MODIFICATIONS' ] = False
18
18
db = SQLAlchemy (app )
19
19
20
20
class DummyModel (db .Model ):
@@ -274,7 +274,7 @@ def test_timezone(self):
274
274
Testing Timezone
275
275
"""
276
276
277
- self .simple_validate ('timezone' , 'US/Pacific-New ' , "NotTZ" )
277
+ self .simple_validate ('timezone' , 'GMT ' , "NotTZ" )
278
278
279
279
def test_timezone_brit (self ):
280
280
"""
@@ -289,6 +289,7 @@ def test_creditcard(self):
289
289
"""
290
290
291
291
self .simple_validate ('creditcard' , '4111 1111 1111 1111' , "202" )
292
+ self .simple_validate ('creditcard' , '4111-1111-1111-1111' , "11111" )
292
293
293
294
def test_currency (self ):
294
295
"""
You can’t perform that action at this time.
0 commit comments