| Conditions | 1 |
| Total Lines | 30 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # pylint: disable=unused-variable,misplaced-comparison-constant,expression-not-assigned |
||
| 8 | def describe_get(): |
||
| 9 | |||
| 10 | def it_redirects_with_param(client): |
||
| 11 | status, data = load(client.get("/api/aliases/?name=foo")) |
||
| 12 | |||
| 13 | expect(status) == 302 |
||
| 14 | expect(data).contains('<a href="/api/aliases/foo">') |
||
| 15 | |||
| 16 | def describe_filter(): |
||
| 17 | |||
| 18 | def with_single_match(client): |
||
| 19 | status, data = load(client.get("/api/aliases/sad-biden")) |
||
| 20 | |||
| 21 | expect(status) == 200 |
||
| 22 | expect(data) == { |
||
| 23 | 'sad-biden': { |
||
| 24 | 'styles': [ |
||
| 25 | 'down', |
||
| 26 | 'scowl', |
||
| 27 | 'window', |
||
| 28 | ], |
||
| 29 | 'template': "http://localhost/api/templates/sad-biden" |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | def with_many_matches(client): |
||
| 34 | status, data = load(client.get("/api/aliases/votestakes")) |
||
| 35 | |||
| 36 | expect(status) == 200 |
||
| 37 | expect(len(data)) == 5 |
||
| 38 |