Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: tests/data/expected_blocks.json

Issue 30053555: Issue 7471 - Add an API for working with blocks of filters (Closed) Base URL: https://hg.adblockplus.org/python-abp
Patch Set: Adjust the API in response to review comments Created May 9, 2019, 4:22 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « abp/filters/rpy.py ('k') | tests/data/filterlist.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/data/expected_blocks.json
===================================================================
new file mode 100644
--- /dev/null
+++ b/tests/data/expected_blocks.json
@@ -0,0 +1,56 @@
+[
+ {
+ "variables": {
+ "foo": "bar",
+ "baz": "some_tricky?variable=with&funny=chars#and-stuff"
+ },
+ "description": "Example block 1\nAnother comment",
+ "filters": [
+ {
+ "text": "||block.ing/filter$domain=foo.com|~bar.com",
+ "selector": {
+ "type": "url-pattern",
+ "value": "||block.ing/filter"
+ },
+ "action": "block",
+ "options": {
+ "domain": {
+ "foo.com": true,
+ "bar.com": false
+ }
+ },
+ "type": "Filter"
+ },
+ {
+ "text": "white.list.ing#@#hiding.filter",
+ "selector": {
+ "type": "css",
+ "value": "hiding.filter"
+ },
+ "action": "show",
+ "options": {
+ "domain": {
+ "white.list.ing": true
+ }
+ },
+ "type": "Filter"
+ }
+ ]
+ },
+ {
+ "description": "Another block",
+ "variables": {},
+ "filters": [
+ {
+ "text": "@@whateve.rs",
+ "selector": {
+ "type": "url-pattern",
+ "value": "whateve.rs"
+ },
+ "action": "allow",
+ "options": {},
+ "type": "Filter"
+ }
+ ]
+ }
+]
« no previous file with comments | « abp/filters/rpy.py ('k') | tests/data/filterlist.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld