Skip to content

Commit e5efd68

Browse files
author
Calvin Wang
committed
Patch Check tests
1 parent 9c2ad28 commit e5efd68

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_checks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def setUpClass(cls):
2020
.getOrCreate())
2121
cls.sc = cls.spark.sparkContext
2222
cls.df = cls.sc.parallelize([
23-
Row(a="foo", b=1, c=5, d=5, e=3, f=1, g='a', h=0, creditCard="5130566665286573", email="[email protected]", ssn="123-45-6789", URL="http://[email protected]:8080", boolean="true"),
24-
Row(a="bar", b=2, c=6, d=5, e=2, f=2, g='b', h=-1, creditCard="4532677117740914", email="[email protected]", ssn="123456789", URL="http://foo.com/(something)?after=parens", boolean="false"),
25-
Row(a="baz", b=3, c=None, d=5, e=1, f=1, g=None, h=2, creditCard="3401453245217421", email="[email protected]", ssn="000-00-0000", URL ="http://[email protected]:8080", boolean="true")]).toDF()
23+
Row(a="foo", b=1, c=5, d=5, e=3, f=1, g='a', h=0, creditCard="5130566665286573", email="[email protected]", ssn="123-45-6789", URL="http://[email protected]:8080", boolean="true"),
24+
Row(a="bar", b=2, c=6, d=5, e=2, f=2, g='b', h=-1, creditCard="4532677117740914", email="[email protected]", ssn="123456789", URL="http://foo.com/(something)?after=parens", boolean="false"),
25+
Row(a="baz", b=3, c=None, d=5, e=1, f=1, g=None, h=2, creditCard="340145324521741", email="[email protected]", ssn="000-00-0000", URL ="http://[email protected]:8080", boolean="true")]).toDF()
2626

2727
@classmethod
2828
def tearDownClass(cls):
@@ -804,7 +804,7 @@ def test_fail_hasMinLength(self):
804804
[Row(constraint_status='Success')])
805805

806806
def test_hasMaxLength(self):
807-
self.assertEqual(self.hasMaxLength("email", lambda x: x == 24, "Column email has 24 characters max"),
807+
self.assertEqual(self.hasMaxLength("email", lambda x: x == 21, "Column email has 24 characters max"),
808808
[Row(constraint_status='Success')])
809809
self.assertEqual(self.hasMaxLength('email', lambda x: x == 25, "does not meet criteria"),
810810
[Row(constraint_status='Failure')])

0 commit comments

Comments
 (0)