Merge lp:~diogo-simoes89/zorba/DC-conversion-tests into lp:zorba/data-cleaning-module

Proposed by Diogo Simões
Status: Merged
Approved by: Chris Hillery
Approved revision: 37
Merged at revision: 37
Proposed branch: lp:~diogo-simoes89/zorba/DC-conversion-tests
Merge into: lp:zorba/data-cleaning-module
Diff against target: 89 lines (+12/-12)
6 files modified
test/Queries/data-cleaning/conversion/address-from-phone.xq (+2/-2)
test/Queries/data-cleaning/conversion/address-from-user.xq (+2/-2)
test/Queries/data-cleaning/conversion/phone-from-address.xq (+2/-2)
test/Queries/data-cleaning/conversion/phone-from-user.xq (+2/-2)
test/Queries/data-cleaning/conversion/user-from-address.xq (+2/-2)
test/Queries/data-cleaning/conversion/user-from-phone.xq (+2/-2)
To merge this branch: bzr merge lp:~diogo-simoes89/zorba/DC-conversion-tests
Reviewer Review Type Date Requested Status
Bruno Martins Approve
Chris Hillery Approve
Review via email: mp+91599@code.launchpad.net

Commit message

New changes in the tests of conversion module. These changes support variations of the webservices results.

Description of the change

New changes in the tests of conversion module:
- address-from-phone
- address-from-user
- phone-from-address
- phone-from-user
- user-from-address
- user-from-phone

These changes support variations of the webservices results

To post a comment you must log in.
Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job DC-conversion-tests-2012-02-06T08-40-38.834Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Approve.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job DC-conversion-tests-2012-02-08T17-49-36.483Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Approve.

Revision history for this message
Bruno Martins (bgmartins) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job DC-conversion-tests-2012-02-22T16-37-27.531Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'test/Queries/data-cleaning/conversion/address-from-phone.xq'
2--- test/Queries/data-cleaning/conversion/address-from-phone.xq 2012-01-26 23:17:06 +0000
3+++ test/Queries/data-cleaning/conversion/address-from-phone.xq 2012-02-06 00:17:18 +0000
4@@ -1,8 +1,8 @@
5 import module namespace conversion = "http://www.zorba-xquery.com/modules/data-cleaning/conversion";
6
7-let $arg := conversion:address-from-phone('8654582358')
8+let $arg := conversion:address-from-phone('8654582358')[1]
9 let $result :=
10- if(exists($arg) or empty($arg))
11+ if(matches($arg, "([0-9]*[ ][A-Z]*[a-z]*)*") and not(matches($arg, "invalid")))
12 then 'OK'
13 else 'NOT OK'
14 return $result
15
16=== modified file 'test/Queries/data-cleaning/conversion/address-from-user.xq'
17--- test/Queries/data-cleaning/conversion/address-from-user.xq 2012-01-26 23:17:06 +0000
18+++ test/Queries/data-cleaning/conversion/address-from-user.xq 2012-02-06 00:17:18 +0000
19@@ -1,8 +1,8 @@
20 import module namespace conversion = "http://www.zorba-xquery.com/modules/data-cleaning/conversion";
21
22-let $arg := conversion:address-from-user('Maria Lurdes')
23+let $arg := conversion:address-from-user('Maria Lurdes')[1]
24 let $result :=
25- if(exists($arg) or empty($arg))
26+ if(matches($arg, "([0-9]*[ ][A-Z]*[a-z]*)*") and not(matches($arg, "invalid")))
27 then 'OK'
28 else 'NOT OK'
29 return $result
30
31=== modified file 'test/Queries/data-cleaning/conversion/phone-from-address.xq'
32--- test/Queries/data-cleaning/conversion/phone-from-address.xq 2012-01-26 23:17:06 +0000
33+++ test/Queries/data-cleaning/conversion/phone-from-address.xq 2012-02-06 00:17:18 +0000
34@@ -1,8 +1,8 @@
35 import module namespace conversion = "http://www.zorba-xquery.com/modules/data-cleaning/conversion";
36
37-let $arg := conversion:phone-from-address('5655 E Gaskill Rd, Willcox, AZ, US')
38+let $arg := conversion:phone-from-address('5655 E Gaskill Rd, Willcox, AZ, US')[1]
39 let $result :=
40- if(exists($arg) or empty($arg))
41+ if(matches($arg, "(\([0-9]{3}\) [0-9]{3}\-[0-9]{4})*") and not(matches($arg, "invalid")))
42 then 'OK'
43 else 'NOT OK'
44 return $result
45
46=== modified file 'test/Queries/data-cleaning/conversion/phone-from-user.xq'
47--- test/Queries/data-cleaning/conversion/phone-from-user.xq 2012-01-26 23:17:06 +0000
48+++ test/Queries/data-cleaning/conversion/phone-from-user.xq 2012-02-06 00:17:18 +0000
49@@ -1,8 +1,8 @@
50 import module namespace conversion = "http://www.zorba-xquery.com/modules/data-cleaning/conversion";
51
52-let $arg := conversion:phone-from-user ('Maria Lurdes')
53+let $arg := conversion:phone-from-user ('Maria Lurdes')[1]
54 let $result :=
55- if(exists($arg) or empty($arg))
56+ if(matches($arg, "(\([0-9]{3}\) [0-9]{3}\-[0-9]{4})*") and not(matches($arg, "invalid")))
57 then 'OK'
58 else 'NOT OK'
59 return $result
60
61=== modified file 'test/Queries/data-cleaning/conversion/user-from-address.xq'
62--- test/Queries/data-cleaning/conversion/user-from-address.xq 2012-01-26 23:17:06 +0000
63+++ test/Queries/data-cleaning/conversion/user-from-address.xq 2012-02-06 00:17:18 +0000
64@@ -1,8 +1,8 @@
65 import module namespace conversion = "http://www.zorba-xquery.com/modules/data-cleaning/conversion";
66
67-let $arg := conversion:user-from-address('5655 E Gaskill Rd, Willcox, AZ, US')
68+let $arg := conversion:user-from-address('5655 E Gaskill Rd, Willcox, AZ, US')[1]
69 let $result :=
70- if(exists($arg) or empty($arg))
71+ if(matches($arg, "([0-9]|[a-z]|[A-Z])*") and not(matches($arg, "invalid")))
72 then 'OK'
73 else 'NOT OK'
74 return $result
75
76=== modified file 'test/Queries/data-cleaning/conversion/user-from-phone.xq'
77--- test/Queries/data-cleaning/conversion/user-from-phone.xq 2012-01-26 23:17:06 +0000
78+++ test/Queries/data-cleaning/conversion/user-from-phone.xq 2012-02-06 00:17:18 +0000
79@@ -1,8 +1,8 @@
80 import module namespace conversion = "http://www.zorba-xquery.com/modules/data-cleaning/conversion";
81
82-let $arg := conversion:user-from-phone ('8654582358')
83+let $arg := conversion:user-from-phone ('8654582358')[1]
84 let $result :=
85- if(exists($arg) or empty($arg))
86+ if(matches($arg, "([0-9]|[a-z]|[A-Z])*") and not(matches($arg, "invalid")))
87 then 'OK'
88 else 'NOT OK'
89 return $result

Subscribers

People subscribed via source and target branches

to all changes: