|
2 | 2 |
|
3 | 3 | def test_iterate_criteria_basic(): |
4 | 4 | output = [x for x in iterate_criteria('foo','bar')] |
5 | | - print output |
6 | | - assert output == [ |
7 | | - {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar'} |
8 | | - ] |
| 5 | + assert sorted(output) == sorted([ |
| 6 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'BUSO'}, |
| 7 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'COMI'}, |
| 8 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'COND'}, |
| 9 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'FARM'}, |
| 10 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'MANU'}, |
| 11 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'MULT'}, |
| 12 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'RENT'}, |
| 13 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'RESI'}, |
| 14 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'TSHR'}, |
| 15 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'VACL'}, |
| 16 | + ]) |
9 | 17 |
|
10 | 18 | def test_iterate_criteria_status(): |
11 | 19 | output = [x for x in iterate_criteria('foo','bar', status=['A'])] |
12 | | - print output |
13 | 20 | assert output == [ |
14 | | - {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'Status': 'A'} |
| 21 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'BUSO', 'Status': 'A'}, |
| 22 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'COMI', 'Status': 'A'}, |
| 23 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'COND', 'Status': 'A'}, |
| 24 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'FARM', 'Status': 'A'}, |
| 25 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'MANU', 'Status': 'A'}, |
| 26 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'MULT', 'Status': 'A'}, |
| 27 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'RENT', 'Status': 'A'}, |
| 28 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'RESI', 'Status': 'A'}, |
| 29 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'TSHR', 'Status': 'A'}, |
| 30 | + {'MLS': 'nwmls', 'BeginDate': 'foo', 'EndDate': 'bar', 'PropertyType': 'VACL', 'Status': 'A'}, |
15 | 31 | ] |
16 | 32 |
|
17 | 33 | def test_iterate_criteria_empty_areas(): |
|
0 commit comments