Skip to content

Commit 71a55e0

Browse files
Added new test suites in emaail validation of the format.json file of the draft3 in test file along python enviroment variables.
1 parent 601aa70 commit 71a55e0

File tree

4 files changed

+56
-1
lines changed

4 files changed

+56
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,4 @@ cython_debug/
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
#.idea/
161+
sandbox

package-lock.json

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88
"tests"
99
],
1010
"author": "http://json-schema.org",
11-
"license": "MIT"
11+
"license": "MIT",
12+
"dependencies": {
13+
"jsonschema": "^1.5.0"
14+
}
1215
}

tests/draft3/format.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,31 @@
3232
"description": "all string formats ignore nulls",
3333
"data": null,
3434
"valid": true
35+
},
36+
{
37+
"description": "User with double dot in email",
38+
"data": "user@example..com",
39+
"valid": false
40+
},
41+
{
42+
"description": "User should use a specific domain",
43+
"data": "user@",
44+
"valid": false
45+
},
46+
{
47+
"description": "Invalid email with space",
48+
"data": "user name@example.com",
49+
"valid": false
50+
},
51+
{
52+
"description": "Invalid email with no spec interpretation",
53+
"data": "user@localhost",
54+
"valid": false
55+
},
56+
{
57+
"description": "Invalid email with unwanted special symbols",
58+
"data": "user//@example.com",
59+
"valid": false
3560
}
3661
]
3762
},
@@ -69,6 +94,7 @@
6994
"data": null,
7095
"valid": true
7196
}
97+
7298
]
7399
},
74100
{

0 commit comments

Comments
 (0)