diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..2d46221 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ + +*Description of changes:* + +*Checklist:* + +- [ ] Write unit tests +- [ ] `make pr` passes +- [ ] Write documentation diff --git a/.gitignore b/.gitignore index 456da47..e3bf41d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ .vscode/ build/ dist/ -venv/ \ No newline at end of file +venv/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..503272c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-added-large-files + - id: check-ast + - id: check-case-conflict + - id: check-json + - id: check-merge-conflict + - id: check-yaml + - id: debug-statements + - id: detect-aws-credentials + args: [--allow-missing-credentials] + - id: detect-private-key + - id: end-of-file-fixer + - id: pretty-format-json + args: [--autofix] + - id: requirements-txt-fixer + - id: trailing-whitespace diff --git a/.travis.yml b/.travis.yml index 894b3f6..d2553ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,11 +11,10 @@ matrix: dist: xenial sudo: true before_install: -- "pip install -U pip" -- "python setup.py install" + - pip install -U pip install: - - pip install tox-travis - - pip install pytest - - pip install pylint + - python setup.py install + - pip install -r requirements_dev.txt + - git diff --name-only $TRAVIS_COMMIT_RANGE | xargs pre-commit run --files script: - tox diff --git a/MANIFEST.in b/MANIFEST.in index 0ee4b20..251f57d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ include requirements.txt include requirements_dev.txt -include rfd/__version__.py \ No newline at end of file +include rfd/__version__.py diff --git a/Makefile b/Makefile index 36f3b6e..822562e 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,35 @@ -build: +SRC:=rfd + +.PHONY: build +build: rm -rf dist/ python setup.py sdist +.PHONY: push_test push_test: twine upload -r testpypi dist/*.tar.gz +.PHONY: push_prod push_prod: - twine upload dist/*.tar.gz \ No newline at end of file + twine upload dist/*.tar.gz + +.PHONY: precommit +precommit: ## Run pre-commit + pre-commit run \ + --all-files \ + --show-diff-on-failure + +.PHONY: lint +lint: + pylint $(SRC) + +.PHONY: test +test: + pytest -v + +.PHONY: pr +pr: precommit lint test + +.PHONY: ci +ci: lint test diff --git a/requirements.txt b/requirements.txt index 49a740f..dba710f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ beautifulsoup4>=4.6.0 click>=7.0 colorama>=0.3.9 -requests>=2.18.0 \ No newline at end of file +requests>=2.18.0 diff --git a/requirements_dev.txt b/requirements_dev.txt index 9ae7f9a..10aada9 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,5 +1,5 @@ -black==19.3b0 -pylint==2.4.2 -pytest==5.2.1 -pytest-sugar==0.9.2 +pre-commit==1.18.3 +pylint +pytest>=4.6.6 rope==0.14.0 +tox-travis==0.12 diff --git a/rfd/utils.py b/rfd/utils.py index b2e2d7a..935606b 100644 --- a/rfd/utils.py +++ b/rfd/utils.py @@ -1,5 +1,6 @@ """This module provides utility functions that are used within rfd""" + def is_int(number): try: int(number) diff --git a/tests/mock_data/threads_api_response.json b/tests/mock_data/threads_api_response.json index 5b5406b..2b90a3a 100644 --- a/tests/mock_data/threads_api_response.json +++ b/tests/mock_data/threads_api_response.json @@ -1,782 +1,757 @@ { "pager": { - "total": -1, + "page": 1, "per_page": 10, + "total": -1, "total_on_page": 10, - "total_pages": -1, - "page": 1 + "total_pages": -1 }, "topics": [ { - "topic_id": 2197859, - "forum_id": 9, - "title": - "[Sponsored] 3 Months Free, Cable 75M, Unlimited Internet $34.99/30 Days, Free Installation/Modem Rental", - "slug": - "carrytel-sponsored-3-months-free-cable-75m-unlimited-internet-34-99-30-days-free-installation-modem-rental", "author_id": 4437, - "is_subscribed": false, - "can_subscribe": false, - "can_report": false, "can_reply": false, - "is_poll": false, - "status": 1, - "type": 1, - "post_time": "2018-06-01T14:46:14+00:00", - "last_post_time": "2018-06-01T14:46:14+00:00", + "can_report": false, + "can_subscribe": false, "first_post_id": 29395579, - "last_post_id": 29395579, - "last_poster_id": 4437, - "total_replies": 0, + "forum_id": 9, "has_new_post": false, - "total_views": 2345, - "visibility": 1, "has_replied": false, - "shadow_type": 0, - "web_path": - "/carrytel-sponsored-3-months-free-cable-75m-unlimited-internet-34-99-30-days-free-installation-modem-rental-2197859/", + "is_poll": false, + "is_subscribed": false, + "last_post_id": 29395579, + "last_post_time": "2018-06-01T14:46:14+00:00", + "last_poster_id": 4437, "offer": { "category_id": 5125, "dealer_id": 0, "dealer_name": "Carrytel", - "url": "https://www.carrytel.ca/3mfree.aspx", + "expires_at": "2018-06-14", "price": "", "savings": "", - "expires_at": "2018-06-14" + "url": "https://www.carrytel.ca/3mfree.aspx" }, - "votes": null, + "post_time": "2018-06-01T14:46:14+00:00", "prefix": null, + "shadow_type": 0, + "slug": "carrytel-sponsored-3-months-free-cable-75m-unlimited-internet-34-99-30-days-free-installation-modem-rental", + "status": 1, "summary": { - "can_edit": false, - "body": "" + "body": "", + "can_edit": false }, - "trader_type": null + "title": "[Sponsored] 3 Months Free, Cable 75M, Unlimited Internet $34.99/30 Days, Free Installation/Modem Rental", + "topic_id": 2197859, + "total_replies": 0, + "total_views": 2345, + "trader_type": null, + "type": 1, + "visibility": 1, + "votes": null, + "web_path": "/carrytel-sponsored-3-months-free-cable-75m-unlimited-internet-34-99-30-days-free-installation-modem-rental-2197859/" }, { - "topic_id": 2191108, - "forum_id": 9, - "title": "WyzeCam 1080p HD Wireless Smart Home Camera v2 $37.49", - "slug": "amazon-ca-wyzecam-1080p-hd-wireless-smart-home-camera-v2-37-49", "author_id": 1411026, - "is_subscribed": false, - "can_subscribe": false, - "can_report": false, "can_reply": false, - "is_poll": false, - "status": 0, - "type": 0, - "post_time": "2018-05-03T15:06:55+00:00", - "last_post_time": "2018-06-03T02:43:17+00:00", + "can_report": false, + "can_subscribe": false, "first_post_id": 29284857, - "last_post_id": 29401295, - "last_poster_id": 38695, - "total_replies": 709, + "forum_id": 9, "has_new_post": false, - "total_views": 129121, - "visibility": 1, "has_replied": false, - "shadow_type": 0, - "web_path": - "/amazon-ca-wyzecam-1080p-hd-wireless-smart-home-camera-v2-37-49-2191108/", + "is_poll": false, + "is_subscribed": false, + "last_post_id": 29401295, + "last_post_time": "2018-06-03T02:43:17+00:00", + "last_poster_id": 38695, "offer": { "category_id": 5123, "dealer_id": 775, "dealer_name": "Amazon Canada", - "url": "https://www.amazon.ca/gp/aw/d/B076H3SRXG/", + "expires_at": null, "price": "$37.49", "savings": "", - "expires_at": null - }, - "votes": { - "total_up": 94, - "total_down": 2, - "current_vote": 0, - "can_vote_up": false, - "can_vote_down": false + "url": "https://www.amazon.ca/gp/aw/d/B076H3SRXG/" }, + "post_time": "2018-05-03T15:06:55+00:00", "prefix": null, + "shadow_type": 0, + "slug": "amazon-ca-wyzecam-1080p-hd-wireless-smart-home-camera-v2-37-49", + "status": 0, "summary": { - "can_edit": false, - "body": "" + "body": "", + "can_edit": false }, - "trader_type": null + "title": "WyzeCam 1080p HD Wireless Smart Home Camera v2 $37.49", + "topic_id": 2191108, + "total_replies": 709, + "total_views": 129121, + "trader_type": null, + "type": 0, + "visibility": 1, + "votes": { + "can_vote_down": false, + "can_vote_up": false, + "current_vote": 0, + "total_down": 2, + "total_up": 94 + }, + "web_path": "/amazon-ca-wyzecam-1080p-hd-wireless-smart-home-camera-v2-37-49-2191108/" }, { - "topic_id": 2197916, - "forum_id": 9, - "title": "Jabra Elite 65T $169.99", - "slug": "best-buy-jabra-elite-65t-169-99", "author_id": 68535, - "is_subscribed": false, - "can_subscribe": false, - "can_report": false, "can_reply": false, - "is_poll": false, - "status": 0, - "type": 0, - "post_time": "2018-06-01T18:36:28+00:00", - "last_post_time": "2018-06-03T02:41:57+00:00", + "can_report": false, + "can_subscribe": false, "first_post_id": 29396697, - "last_post_id": 29401292, - "last_poster_id": 37990, - "total_replies": 37, + "forum_id": 9, "has_new_post": false, - "total_views": 6171, - "visibility": 1, "has_replied": false, - "shadow_type": 0, - "web_path": "/best-buy-jabra-elite-65t-169-99-2197916/", + "is_poll": false, + "is_subscribed": false, + "last_post_id": 29401292, + "last_post_time": "2018-06-03T02:41:57+00:00", + "last_poster_id": 37990, "offer": { "category_id": 9, "dealer_id": 57, "dealer_name": "Best Buy", - "url": - "https://m.bestbuy.ca/en-CA/product/jabra-elite-65t-in-ear-noise-cancelling-truly-wireless-bluetooth-headphones-with-mic-black/12321947", + "expires_at": "2018-06-07", "price": "169.99", "savings": "", - "expires_at": "2018-06-07" - }, - "votes": { - "total_up": 8, - "total_down": 0, - "current_vote": 0, - "can_vote_up": false, - "can_vote_down": false + "url": "https://m.bestbuy.ca/en-CA/product/jabra-elite-65t-in-ear-noise-cancelling-truly-wireless-bluetooth-headphones-with-mic-black/12321947" }, + "post_time": "2018-06-01T18:36:28+00:00", "prefix": null, + "shadow_type": 0, + "slug": "best-buy-jabra-elite-65t-169-99", + "status": 0, "summary": { - "can_edit": false, - "body": - "Desktop / non-mobile link: \u003Ca href=\u0022https://www.bestbuy.ca/en-ca/product/jabra-elite-65t-in-ear-noise-cancelling-truly-wireless-bluetooth-headphones-with-mic-black/12321947.aspx\u0022 rel=\u0022nofollow noreferrer\u0022 target=\u0022_blank\u0022 class=\u0022postlink\u0022\u003Ehttps://www.bestbuy.ca/en-ca/product/ja ... 21947.aspx\u003C/a\u003E" + "body": "Desktop / non-mobile link: https://www.bestbuy.ca/en-ca/product/ja ... 21947.aspx", + "can_edit": false }, - "trader_type": null + "title": "Jabra Elite 65T $169.99", + "topic_id": 2197916, + "total_replies": 37, + "total_views": 6171, + "trader_type": null, + "type": 0, + "visibility": 1, + "votes": { + "can_vote_down": false, + "can_vote_up": false, + "current_vote": 0, + "total_down": 0, + "total_up": 8 + }, + "web_path": "/best-buy-jabra-elite-65t-169-99-2197916/" }, { - "topic_id": 2198211, - "forum_id": 9, - "title": - "Glad Cling Wrap Plastic Wrap, 300 Metre Roll - best price $9.47", - "slug": - "amazon-ca-glad-cling-wrap-plastic-wrap-300-metre-roll-best-price-9-47", "author_id": 1408083, - "is_subscribed": false, - "can_subscribe": false, - "can_report": false, "can_reply": false, - "is_poll": false, - "status": 0, - "type": 0, - "post_time": "2018-06-03T02:13:45+00:00", - "last_post_time": "2018-06-03T02:34:19+00:00", + "can_report": false, + "can_subscribe": false, "first_post_id": 29401248, - "last_post_id": 29401285, - "last_poster_id": 26936, - "total_replies": 1, + "forum_id": 9, "has_new_post": false, - "total_views": 264, - "visibility": 1, "has_replied": false, - "shadow_type": 0, - "web_path": - "/amazon-ca-glad-cling-wrap-plastic-wrap-300-metre-roll-best-price-9-47-2198211/", + "is_poll": false, + "is_subscribed": false, + "last_post_id": 29401285, + "last_post_time": "2018-06-03T02:34:19+00:00", + "last_poster_id": 26936, "offer": { "category_id": 5142, "dealer_id": 775, "dealer_name": "Amazon Canada", - "url": - "https://www.amazon.ca/Glad-Cling-Wrap-Plastic-Metre/dp/B01GZTGTWW/ref=sr_1_6?ie=UTF8\u0026amp;qid=1527978057\u0026amp;sr=8-6\u0026amp;keywords=cling+film", + "expires_at": null, "price": "9.47", "savings": "28% off", - "expires_at": null - }, - "votes": { - "total_up": 1, - "total_down": 0, - "current_vote": 0, - "can_vote_up": false, - "can_vote_down": false + "url": "https://www.amazon.ca/Glad-Cling-Wrap-Plastic-Metre/dp/B01GZTGTWW/ref=sr_1_6?ie=UTF8&qid=1527978057&sr=8-6&keywords=cling+film" }, + "post_time": "2018-06-03T02:13:45+00:00", "prefix": null, + "shadow_type": 0, + "slug": "amazon-ca-glad-cling-wrap-plastic-wrap-300-metre-roll-best-price-9-47", + "status": 0, "summary": { - "can_edit": false, - "body": "" + "body": "", + "can_edit": false }, - "trader_type": null + "title": "Glad Cling Wrap Plastic Wrap, 300 Metre Roll - best price $9.47", + "topic_id": 2198211, + "total_replies": 1, + "total_views": 264, + "trader_type": null, + "type": 0, + "visibility": 1, + "votes": { + "can_vote_down": false, + "can_vote_up": false, + "current_vote": 0, + "total_down": 0, + "total_up": 1 + }, + "web_path": "/amazon-ca-glad-cling-wrap-plastic-wrap-300-metre-roll-best-price-9-47-2198211/" }, { - "topic_id": 2195171, - "forum_id": 9, - "title": "Firman 3300 inverter generator $599", - "slug": "costco-firman-3300-inverter-generator-599", "author_id": 1364941, - "is_subscribed": false, - "can_subscribe": false, - "can_report": false, "can_reply": false, - "is_poll": false, - "status": 0, - "type": 0, - "post_time": "2018-05-21T07:29:13+00:00", - "last_post_time": "2018-06-03T02:33:41+00:00", + "can_report": false, + "can_subscribe": false, "first_post_id": 29351891, - "last_post_id": 29401283, - "last_poster_id": 69083, - "total_replies": 124, + "forum_id": 9, "has_new_post": false, - "total_views": 18634, - "visibility": 1, "has_replied": false, - "shadow_type": 0, - "web_path": "/costco-firman-3300-inverter-generator-599-2195171/", + "is_poll": false, + "is_subscribed": false, + "last_post_id": 29401283, + "last_post_time": "2018-06-03T02:33:41+00:00", + "last_poster_id": 69083, "offer": { "category_id": 5136, "dealer_id": 110, "dealer_name": "Costco", - "url": "https://m.costco.ca/.product.2414104.html", + "expires_at": "2018-06-03", "price": "$599", "savings": "", - "expires_at": "2018-06-03" - }, - "votes": { - "total_up": 17, - "total_down": 0, - "current_vote": 0, - "can_vote_up": false, - "can_vote_down": false + "url": "https://m.costco.ca/.product.2414104.html" }, + "post_time": "2018-05-21T07:29:13+00:00", "prefix": null, + "shadow_type": 0, + "slug": "costco-firman-3300-inverter-generator-599", + "status": 0, "summary": { - "can_edit": false, - "body": "" + "body": "", + "can_edit": false }, - "trader_type": null + "title": "Firman 3300 inverter generator $599", + "topic_id": 2195171, + "total_replies": 124, + "total_views": 18634, + "trader_type": null, + "type": 0, + "visibility": 1, + "votes": { + "can_vote_down": false, + "can_vote_up": false, + "current_vote": 0, + "total_down": 0, + "total_up": 17 + }, + "web_path": "/costco-firman-3300-inverter-generator-599-2195171/" }, { - "topic_id": 2198199, - "forum_id": 9, - "title": "HOT - KitchenAid Stand Mixer - $199", - "slug": "walmart-hot-kitchenaid-stand-mixer-199", "author_id": 265861, - "is_subscribed": false, - "can_subscribe": false, - "can_report": false, "can_reply": false, - "is_poll": false, - "status": 0, - "type": 0, - "post_time": "2018-06-03T00:05:40+00:00", - "last_post_time": "2018-06-03T02:33:04+00:00", + "can_report": false, + "can_subscribe": false, "first_post_id": 29400944, - "last_post_id": 29401282, - "last_poster_id": 311667, - "total_replies": 8, + "forum_id": 9, "has_new_post": false, - "total_views": 1334, - "visibility": 1, "has_replied": false, - "shadow_type": 0, - "web_path": "/walmart-hot-kitchenaid-stand-mixer-199-2198199/", + "is_poll": false, + "is_subscribed": false, + "last_post_id": 29401282, + "last_post_time": "2018-06-03T02:33:04+00:00", + "last_poster_id": 311667, "offer": { "category_id": 5139, "dealer_id": 450, "dealer_name": "Walmart", - "url": - "https://www.walmart.ca/en/ip/kitchenaid-275w-classic-plus-stand-mixer-ksm75sl/6000195341286", + "expires_at": null, "price": "199", "savings": "50% off", - "expires_at": null - }, - "votes": { - "total_up": 4, - "total_down": 1, - "current_vote": 0, - "can_vote_up": false, - "can_vote_down": false + "url": "https://www.walmart.ca/en/ip/kitchenaid-275w-classic-plus-stand-mixer-ksm75sl/6000195341286" }, + "post_time": "2018-06-03T00:05:40+00:00", "prefix": null, + "shadow_type": 0, + "slug": "walmart-hot-kitchenaid-stand-mixer-199", + "status": 0, "summary": { - "can_edit": false, - "body": "" + "body": "", + "can_edit": false }, - "trader_type": null + "title": "HOT - KitchenAid Stand Mixer - $199", + "topic_id": 2198199, + "total_replies": 8, + "total_views": 1334, + "trader_type": null, + "type": 0, + "visibility": 1, + "votes": { + "can_vote_down": false, + "can_vote_up": false, + "current_vote": 0, + "total_down": 1, + "total_up": 4 + }, + "web_path": "/walmart-hot-kitchenaid-stand-mixer-199-2198199/" }, { - "topic_id": 2198164, - "forum_id": 9, - "title": - "Seagate Expansion 4TB Portable External Hard Drive USB 3.0 (STEA4000400) $119.92", - "slug": - "amazon-ca-seagate-expansion-4tb-portable-external-hard-drive-usb-3-0-stea4000400-119-92", "author_id": 177843, - "is_subscribed": false, - "can_subscribe": false, - "can_report": false, "can_reply": false, - "is_poll": false, - "status": 0, - "type": 0, - "post_time": "2018-06-02T20:12:30+00:00", - "last_post_time": "2018-06-03T02:32:09+00:00", + "can_report": false, + "can_subscribe": false, "first_post_id": 29400374, - "last_post_id": 29401280, - "last_poster_id": 1373719, - "total_replies": 4, + "forum_id": 9, "has_new_post": false, - "total_views": 827, - "visibility": 1, "has_replied": false, - "shadow_type": 0, - "web_path": - "/amazon-ca-seagate-expansion-4tb-portable-external-hard-drive-usb-3-0-stea4000400-119-92-2198164/", + "is_poll": false, + "is_subscribed": false, + "last_post_id": 29401280, + "last_post_time": "2018-06-03T02:32:09+00:00", + "last_poster_id": 1373719, "offer": { "category_id": 5119, "dealer_id": 775, "dealer_name": "Amazon Canada", - "url": - "https://www.amazon.ca/Seagate-Expansion-Portable-External-STEA4000400/dp/B017KE8OG0/ref=pd_cart_crc_sbs_2_1?_encoding=UTF8\u0026amp;pd_rd_i=B017KE8OG0\u0026amp;pd_rd_r=19RNAC5G5MN50M7THMXQ\u0026amp;pd_rd_w=NPMyB\u0026amp;pd_rd_wg=2y64K\u0026amp;pf_rd_i=cart-page-widgets\u0026amp;pf_rd_m=A3DWYIK6Y9EEQB\u0026amp;pf_rd_p=1228945996396599610\u0026amp;pf_rd_r=19RNAC5G5MN50M7THMXQ\u0026amp;pf_rd_s=cart-page-widgets\u0026amp;pf_rd_t=40701\u0026amp;psc=1\u0026amp;refRID=19RNAC5G5MN50M7THMXQ", + "expires_at": null, "price": "119.92", "savings": "13%", - "expires_at": null - }, - "votes": { - "total_up": 0, - "total_down": 1, - "current_vote": 0, - "can_vote_up": false, - "can_vote_down": false + "url": "https://www.amazon.ca/Seagate-Expansion-Portable-External-STEA4000400/dp/B017KE8OG0/ref=pd_cart_crc_sbs_2_1?_encoding=UTF8&pd_rd_i=B017KE8OG0&pd_rd_r=19RNAC5G5MN50M7THMXQ&pd_rd_w=NPMyB&pd_rd_wg=2y64K&pf_rd_i=cart-page-widgets&pf_rd_m=A3DWYIK6Y9EEQB&pf_rd_p=1228945996396599610&pf_rd_r=19RNAC5G5MN50M7THMXQ&pf_rd_s=cart-page-widgets&pf_rd_t=40701&psc=1&refRID=19RNAC5G5MN50M7THMXQ" }, + "post_time": "2018-06-02T20:12:30+00:00", "prefix": null, + "shadow_type": 0, + "slug": "amazon-ca-seagate-expansion-4tb-portable-external-hard-drive-usb-3-0-stea4000400-119-92", + "status": 0, "summary": { - "can_edit": false, - "body": "" + "body": "", + "can_edit": false }, - "trader_type": null + "title": "Seagate Expansion 4TB Portable External Hard Drive USB 3.0 (STEA4000400) $119.92", + "topic_id": 2198164, + "total_replies": 4, + "total_views": 827, + "trader_type": null, + "type": 0, + "visibility": 1, + "votes": { + "can_vote_down": false, + "can_vote_up": false, + "current_vote": 0, + "total_down": 1, + "total_up": 0 + }, + "web_path": "/amazon-ca-seagate-expansion-4tb-portable-external-hard-drive-usb-3-0-stea4000400-119-92-2198164/" }, { - "topic_id": 2198212, - "forum_id": 9, - "title": - "WORKSHOP Wet Dry Vacs Ash Vacuum Cleaner WS0500ASH, 5-Gallon Ash Vac 65% Off, Now: $48.54", - "slug": - "workshop-wet-dry-vacs-ash-vacuum-cleaner-ws0500ash-5-gallon-ash-vac-65-off-now-48-54", "author_id": 1431114, - "is_subscribed": false, - "can_subscribe": false, - "can_report": false, "can_reply": false, - "is_poll": false, - "status": 0, - "type": 0, - "post_time": "2018-06-03T02:25:50+00:00", - "last_post_time": "2018-06-03T02:25:50+00:00", + "can_report": false, + "can_subscribe": false, "first_post_id": 29401272, - "last_post_id": 29401272, - "last_poster_id": 1431114, - "total_replies": 0, + "forum_id": 9, "has_new_post": false, - "total_views": 129, - "visibility": 1, "has_replied": false, - "shadow_type": 0, - "web_path": - "/workshop-wet-dry-vacs-ash-vacuum-cleaner-ws0500ash-5-gallon-ash-vac-65-off-now-48-54-2198212/", + "is_poll": false, + "is_subscribed": false, + "last_post_id": 29401272, + "last_post_time": "2018-06-03T02:25:50+00:00", + "last_poster_id": 1431114, "offer": { "category_id": 5, "dealer_id": 0, "dealer_name": "", - "url": - "https://www.amazon.ca/WORKSHOP-Wet-Dry-Vacs-WS0500ASH/dp/B01983NYD4/ref=as_li_ss_tl?ie=UTF8\u0026amp;linkCode=ll1\u0026amp;tag=ybbs-20\u0026amp;linkId=d729e8e2fc16a114465332d984ab914d", + "expires_at": null, "price": "", "savings": "", - "expires_at": null - }, - "votes": { - "total_up": 0, - "total_down": 0, - "current_vote": 0, - "can_vote_up": false, - "can_vote_down": false + "url": "https://www.amazon.ca/WORKSHOP-Wet-Dry-Vacs-WS0500ASH/dp/B01983NYD4/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=ybbs-20&linkId=d729e8e2fc16a114465332d984ab914d" }, + "post_time": "2018-06-03T02:25:50+00:00", "prefix": null, + "shadow_type": 0, + "slug": "workshop-wet-dry-vacs-ash-vacuum-cleaner-ws0500ash-5-gallon-ash-vac-65-off-now-48-54", + "status": 0, "summary": { - "can_edit": false, - "body": "" + "body": "", + "can_edit": false }, - "trader_type": null + "title": "WORKSHOP Wet Dry Vacs Ash Vacuum Cleaner WS0500ASH, 5-Gallon Ash Vac 65% Off, Now: $48.54", + "topic_id": 2198212, + "total_replies": 0, + "total_views": 129, + "trader_type": null, + "type": 0, + "visibility": 1, + "votes": { + "can_vote_down": false, + "can_vote_up": false, + "current_vote": 0, + "total_down": 0, + "total_up": 0 + }, + "web_path": "/workshop-wet-dry-vacs-ash-vacuum-cleaner-ws0500ash-5-gallon-ash-vac-65-off-now-48-54-2198212/" }, { - "topic_id": 2198191, - "forum_id": 9, - "title": "NBA 2K18 (Nintendo Switch) -$19.99 or $16.99 PM", - "slug": "the-source-nba-2k18-nintendo-switch-19-99-16-99-pm", "author_id": 446796, - "is_subscribed": false, - "can_subscribe": false, - "can_report": false, "can_reply": false, - "is_poll": false, - "status": 0, - "type": 0, - "post_time": "2018-06-02T23:03:52+00:00", - "last_post_time": "2018-06-03T02:24:50+00:00", + "can_report": false, + "can_subscribe": false, "first_post_id": 29400815, - "last_post_id": 29401270, - "last_poster_id": 1379113, - "total_replies": 1, + "forum_id": 9, "has_new_post": false, - "total_views": 957, - "visibility": 1, "has_replied": false, - "shadow_type": 0, - "web_path": - "/the-source-nba-2k18-nintendo-switch-19-99-16-99-pm-2198191/", + "is_poll": false, + "is_subscribed": false, + "last_post_id": 29401270, + "last_post_time": "2018-06-03T02:24:50+00:00", + "last_poster_id": 1379113, "offer": { "category_id": 5127, "dealer_id": 491, "dealer_name": "The Source", - "url": - "https://www.thesource.ca/en-ca/gaming/nintendo-switch/nintendo-switch-games/nba-2k18-for-nintendo-switch/p/108070285", + "expires_at": null, "price": "$19.99", "savings": "", - "expires_at": null - }, - "votes": { - "total_up": 4, - "total_down": 0, - "current_vote": 0, - "can_vote_up": false, - "can_vote_down": false + "url": "https://www.thesource.ca/en-ca/gaming/nintendo-switch/nintendo-switch-games/nba-2k18-for-nintendo-switch/p/108070285" }, + "post_time": "2018-06-02T23:03:52+00:00", "prefix": null, + "shadow_type": 0, + "slug": "the-source-nba-2k18-nintendo-switch-19-99-16-99-pm", + "status": 0, "summary": { - "can_edit": false, - "body": "" + "body": "", + "can_edit": false }, - "trader_type": null + "title": "NBA 2K18 (Nintendo Switch) -$19.99 or $16.99 PM", + "topic_id": 2198191, + "total_replies": 1, + "total_views": 957, + "trader_type": null, + "type": 0, + "visibility": 1, + "votes": { + "can_vote_down": false, + "can_vote_up": false, + "current_vote": 0, + "total_down": 0, + "total_up": 4 + }, + "web_path": "/the-source-nba-2k18-nintendo-switch-19-99-16-99-pm-2198191/" }, { - "topic_id": 2198145, - "forum_id": 9, - "title": "CROCS.CA 40%OFF Select style - at checkout", - "slug": "crocs-crocs-ca-40-off-select-style-checkout", "author_id": 690944, - "is_subscribed": false, - "can_subscribe": false, - "can_report": false, "can_reply": false, - "is_poll": false, - "status": 0, - "type": 0, - "post_time": "2018-06-02T18:05:22+00:00", - "last_post_time": "2018-06-03T02:22:46+00:00", + "can_report": false, + "can_subscribe": false, "first_post_id": 29400002, - "last_post_id": 29401267, - "last_poster_id": 835285, - "total_replies": 4, + "forum_id": 9, "has_new_post": false, - "total_views": 1247, - "visibility": 1, "has_replied": false, - "shadow_type": 0, - "web_path": "/crocs-crocs-ca-40-off-select-style-checkout-2198145/", + "is_poll": false, + "is_subscribed": false, + "last_post_id": 29401267, + "last_post_time": "2018-06-03T02:22:46+00:00", + "last_poster_id": 835285, "offer": { "category_id": 12, "dealer_id": 112, "dealer_name": "Crocs", - "url": "https://www.crocs.ca/sale/crocs-deals,en_CA,sc.html", + "expires_at": null, "price": "vary", "savings": "40% off", - "expires_at": null - }, - "votes": { - "total_up": 5, - "total_down": 0, - "current_vote": 0, - "can_vote_up": false, - "can_vote_down": false + "url": "https://www.crocs.ca/sale/crocs-deals,en_CA,sc.html" }, + "post_time": "2018-06-02T18:05:22+00:00", "prefix": null, + "shadow_type": 0, + "slug": "crocs-crocs-ca-40-off-select-style-checkout", + "status": 0, "summary": { - "can_edit": false, - "body": "" + "body": "", + "can_edit": false }, - "trader_type": null + "title": "CROCS.CA 40%OFF Select style - at checkout", + "topic_id": 2198145, + "total_replies": 4, + "total_views": 1247, + "trader_type": null, + "type": 0, + "visibility": 1, + "votes": { + "can_vote_down": false, + "can_vote_up": false, + "current_vote": 0, + "total_down": 0, + "total_up": 5 + }, + "web_path": "/crocs-crocs-ca-40-off-select-style-checkout-2198145/" } ], "users": [ { - "user_id": 4437, - "username": "RedFlagDeals.com", - "total_posts": 7987, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, + "avatar_height": null, "avatar_url": null, "avatar_width": null, - "avatar_height": null, - "rank": "Moderator", + "can_send_messages": true, + "can_view_messages": true, "group": 4, + "is_local_deals_admin": false, "join_date": "2003-05-18T16:00:00+00:00", - "location": "" + "location": "", + "rank": "Moderator", + "total_posts": 7987, + "user_id": 4437, + "username": "RedFlagDeals.com" }, { - "user_id": 26936, - "username": "ahoroba", - "total_posts": 1335, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": - "https://forums.redflagdeals.com/avatar/26936_1470311361.gif", - "avatar_width": 32, "avatar_height": 32, - "rank": "Deal Addict", + "avatar_url": "https://forums.redflagdeals.com/avatar/26936_1470311361.gif", + "avatar_width": 32, + "can_send_messages": true, + "can_view_messages": true, "group": 2, + "is_local_deals_admin": false, "join_date": "2005-07-25T14:30:43+00:00", - "location": "" - }, - { - "user_id": 37990, - "username": "EP32k2", - "total_posts": 9184, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": null, - "avatar_width": null, - "avatar_height": null, - "rank": "Penalty Box", - "group": 2, - "join_date": "2006-01-16T22:54:23+00:00", - "location": "Richmond Hill" - }, - { - "user_id": 38695, - "username": "astigdealz", - "total_posts": 334, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": - "https://forums.redflagdeals.com/avatar/38695_1484397258.jpg", - "avatar_width": 95, - "avatar_height": 100, - "rank": "Member", - "group": 2, - "join_date": "2006-01-29T16:04:31+00:00", - "location": "Brampton" - }, - { - "user_id": 68535, - "username": "vanhalen26", - "total_posts": 236, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": null, - "avatar_width": null, - "avatar_height": null, - "rank": "Member", - "group": 2, - "join_date": "2006-12-01T17:32:38+00:00", - "location": "Toronto" - }, - { - "user_id": 69083, - "username": "Imago", - "total_posts": 358, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": null, - "avatar_width": null, - "avatar_height": null, - "rank": "Member", - "group": 2, - "join_date": "2006-12-04T19:51:16+00:00", - "location": "Craven" - }, - { - "user_id": 177843, - "username": "voodoo22", - "total_posts": 497, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": null, - "avatar_width": null, - "avatar_height": null, - "rank": "Member", - "group": 2, - "join_date": "2008-08-25T16:38:10+00:00", - "location": "Victoria" - }, - { - "user_id": 265861, - "username": "pvdv", - "total_posts": 15, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": null, - "avatar_width": null, - "avatar_height": null, - "rank": "Newbie", - "group": 2, - "join_date": "2009-10-28T21:56:08+00:00", - "location": "Waterloo, ON, Canada" - }, - { - "user_id": 311667, - "username": "tew", - "total_posts": 1158, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": - "https://forums.redflagdeals.com/avatar/311667_1470311465.jpg", - "avatar_width": 100, - "avatar_height": 80, + "location": "", "rank": "Deal Addict", - "group": 2, - "join_date": "2010-06-14T19:23:15+00:00", - "location": "GTA" + "total_posts": 1335, + "user_id": 26936, + "username": "ahoroba" }, { - "user_id": 446796, - "username": "cain2589", - "total_posts": 261, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, + "avatar_height": null, "avatar_url": null, "avatar_width": null, - "avatar_height": null, - "rank": "Member", + "can_send_messages": true, + "can_view_messages": true, "group": 2, - "join_date": "2011-07-24T23:56:20+00:00", - "location": "Ottawa" + "is_local_deals_admin": false, + "join_date": "2006-01-16T22:54:23+00:00", + "location": "Richmond Hill", + "rank": "Penalty Box", + "total_posts": 9184, + "user_id": 37990, + "username": "EP32k2" }, { - "user_id": 690944, - "username": "Bessem", - "total_posts": 833, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": null, - "avatar_width": null, - "avatar_height": null, - "rank": "Sr. Member", - "group": 2, - "join_date": "2013-11-08T16:06:10+00:00", - "location": "Montreal" - }, - { - "user_id": 835285, - "username": "tark514", - "total_posts": 250, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": null, - "avatar_width": null, - "avatar_height": null, - "rank": "Member", - "group": 2, - "join_date": "2015-12-06T12:36:38+00:00", - "location": "Verdun, QC" - }, - { - "user_id": 1364941, - "username": "Susanclark", - "total_posts": 41, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": null, - "avatar_width": null, - "avatar_height": null, - "rank": "Newbie", - "group": 2, - "join_date": "2016-08-19T07:04:00+00:00", - "location": "" - }, - { - "user_id": 1373719, - "username": "natrill", - "total_posts": 52, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": null, - "avatar_width": null, - "avatar_height": null, - "rank": "Newbie", - "group": 2, - "join_date": "2016-11-26T23:55:52+00:00", - "location": "" - }, - { - "user_id": 1379113, - "username": "thyeri", - "total_posts": 13, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": null, - "avatar_width": null, - "avatar_height": null, - "rank": "Newbie", - "group": 2, - "join_date": "2017-01-20T04:10:14+00:00", - "location": "" - }, - { - "user_id": 1408083, - "username": "Kyuuan", - "total_posts": 81, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, - "avatar_url": - "https://forums.redflagdeals.com/avatar/1408083_1511554534.jpg", - "avatar_width": 100, "avatar_height": 100, - "rank": "Newbie", + "avatar_url": "https://forums.redflagdeals.com/avatar/38695_1484397258.jpg", + "avatar_width": 95, + "can_send_messages": true, + "can_view_messages": true, "group": 2, + "is_local_deals_admin": false, + "join_date": "2006-01-29T16:04:31+00:00", + "location": "Brampton", + "rank": "Member", + "total_posts": 334, + "user_id": 38695, + "username": "astigdealz" + }, + { + "avatar_height": null, + "avatar_url": null, + "avatar_width": null, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2006-12-01T17:32:38+00:00", + "location": "Toronto", + "rank": "Member", + "total_posts": 236, + "user_id": 68535, + "username": "vanhalen26" + }, + { + "avatar_height": null, + "avatar_url": null, + "avatar_width": null, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2006-12-04T19:51:16+00:00", + "location": "Craven", + "rank": "Member", + "total_posts": 358, + "user_id": 69083, + "username": "Imago" + }, + { + "avatar_height": null, + "avatar_url": null, + "avatar_width": null, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2008-08-25T16:38:10+00:00", + "location": "Victoria", + "rank": "Member", + "total_posts": 497, + "user_id": 177843, + "username": "voodoo22" + }, + { + "avatar_height": null, + "avatar_url": null, + "avatar_width": null, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2009-10-28T21:56:08+00:00", + "location": "Waterloo, ON, Canada", + "rank": "Newbie", + "total_posts": 15, + "user_id": 265861, + "username": "pvdv" + }, + { + "avatar_height": 80, + "avatar_url": "https://forums.redflagdeals.com/avatar/311667_1470311465.jpg", + "avatar_width": 100, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2010-06-14T19:23:15+00:00", + "location": "GTA", + "rank": "Deal Addict", + "total_posts": 1158, + "user_id": 311667, + "username": "tew" + }, + { + "avatar_height": null, + "avatar_url": null, + "avatar_width": null, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2011-07-24T23:56:20+00:00", + "location": "Ottawa", + "rank": "Member", + "total_posts": 261, + "user_id": 446796, + "username": "cain2589" + }, + { + "avatar_height": null, + "avatar_url": null, + "avatar_width": null, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2013-11-08T16:06:10+00:00", + "location": "Montreal", + "rank": "Sr. Member", + "total_posts": 833, + "user_id": 690944, + "username": "Bessem" + }, + { + "avatar_height": null, + "avatar_url": null, + "avatar_width": null, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2015-12-06T12:36:38+00:00", + "location": "Verdun, QC", + "rank": "Member", + "total_posts": 250, + "user_id": 835285, + "username": "tark514" + }, + { + "avatar_height": null, + "avatar_url": null, + "avatar_width": null, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2016-08-19T07:04:00+00:00", + "location": "", + "rank": "Newbie", + "total_posts": 41, + "user_id": 1364941, + "username": "Susanclark" + }, + { + "avatar_height": null, + "avatar_url": null, + "avatar_width": null, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2016-11-26T23:55:52+00:00", + "location": "", + "rank": "Newbie", + "total_posts": 52, + "user_id": 1373719, + "username": "natrill" + }, + { + "avatar_height": null, + "avatar_url": null, + "avatar_width": null, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, + "join_date": "2017-01-20T04:10:14+00:00", + "location": "", + "rank": "Newbie", + "total_posts": 13, + "user_id": 1379113, + "username": "thyeri" + }, + { + "avatar_height": 100, + "avatar_url": "https://forums.redflagdeals.com/avatar/1408083_1511554534.jpg", + "avatar_width": 100, + "can_send_messages": true, + "can_view_messages": true, + "group": 2, + "is_local_deals_admin": false, "join_date": "2017-11-09T02:55:42+00:00", - "location": "" + "location": "", + "rank": "Newbie", + "total_posts": 81, + "user_id": 1408083, + "username": "Kyuuan" }, { - "user_id": 1411026, - "username": "HeyAgain88", - "total_posts": 4, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, + "avatar_height": null, "avatar_url": null, "avatar_width": null, - "avatar_height": null, - "rank": "Newbie", + "can_send_messages": true, + "can_view_messages": true, "group": 2, + "is_local_deals_admin": false, "join_date": "2017-11-27T01:18:10+00:00", - "location": "" + "location": "", + "rank": "Newbie", + "total_posts": 4, + "user_id": 1411026, + "username": "HeyAgain88" }, { - "user_id": 1431114, - "username": "askmenow", - "total_posts": 6, - "can_view_messages": true, - "can_send_messages": true, - "is_local_deals_admin": false, + "avatar_height": null, "avatar_url": null, "avatar_width": null, - "avatar_height": null, - "rank": "Newbie", + "can_send_messages": true, + "can_view_messages": true, "group": 2, + "is_local_deals_admin": false, "join_date": "2018-05-24T14:34:30+00:00", - "location": "" + "location": "", + "rank": "Newbie", + "total_posts": 6, + "user_id": 1431114, + "username": "askmenow" } ] } diff --git a/tox.ini b/tox.ini index 040bf9a..81d8bd6 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,6 @@ envlist = py{27, } [testenv] +passenv = SSH_AUTH_SOCK commands = - pytest - pylint rfd + make ci