Skip to content

Commit

Permalink
beginning of adding pylint and added a test for output controller
Browse files Browse the repository at this point in the history
  • Loading branch information
caprexy committed Oct 5, 2023
1 parent 1b4f99d commit f4d6f96
Show file tree
Hide file tree
Showing 17 changed files with 3,746 additions and 7 deletions.
Binary file added testing/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file modified testing/__pycache__/databaseTest.cpython-310.pyc
Binary file not shown.
Binary file not shown.
Binary file modified testing/__pycache__/testConstants.cpython-310.pyc
Binary file not shown.
13 changes: 7 additions & 6 deletions testing/databaseTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def setUpClass(cls):
cls.database = database.Database()

# sample user data
cls.databaseId = 2
cls.databaseId = 72813
cls.name = "na"
cls.service = "Patreon"
cls.checkedPostIds = [84905474,84778099,84238287,83529449,83343026,83218897,83169653,83065295,82276738,82064413,81954654,81851518,81209841,81059547,80704628,80338946,80190808,79994633,78434719,77440488,76755887,75926672,75710038,75580104,75157411,75022239,74916213,74693973,74245334,74158934,73468219,73194386,72942785,72646675,72467685,72405353,72310762,72205399,72091429,72030404,72001916,71756991,71677434,71623437,71380943,71238640,71182880,71135747,71087979,71070581]
cls.checkedPostIds = [84905474, 84778099, 84238287, 83529449, 83343026, 83218897, 83169653, 83065295, 82276738, 82064413, 81954654, 81851518, 81209841, 81059547, 80704628, 80338946, 80190808, 79994633, 78434719, 77440488, 76755887, 75926672, 75710038, 75580104, 75157411, 75022239, 74916213, 74693973, 74245334, 74158934, 73468219, 73194386, 72942785, 72646675, 72467685, 72405353, 72310762, 72205399, 72091429, 72030404, 72001916, 71756991, 71677434, 71623437, 71380943, 71238640, 71182880, 71135747, 71087979, 71070581, 71062351, 70996043, 70943219, 70897713, 70853491, 70808920, 70769224, 70745940, 70716118, 70668831, 70668428, 70661972, 70605413, 70568003, 70527415, 70526592, 70489194, 70114372, 69844726, 69806320, 69437650, 69267254, 68972303, 68433820, 68341058, 68202290, 68113175, 68024574, 67908936, 67606882, 67436555, 67305910, 67104339, 66932176, 66803019, 66689004, 66646000, 66438173, 66382705, 66218736, 66063628, 65980003, 65911698, 65731008, 65424136, 65392885, 65214407, 64974747, 64968926, 64828106]
cls.uncheckedPostIds = []

cls.idTwo = 645
Expand Down Expand Up @@ -55,13 +55,15 @@ def test1CreateTwoUsers(self):
def side_effect_apiCall(self, url, *args, **kwargs): # Accept extra arguments
mock_res = MagicMock()
if url.endswith("=0"):
with open(testConstants.apiSampleCallBytesLocation, 'rb') as file:
with open(testConstants.USER1_FIRST_PAGE, 'rb') as file:
sample_api_bytes = file.read()
mock_res.read.return_value = sample_api_bytes
elif url.endswith("50"):
mock_res.read.return_value = b'{}'
with open(testConstants.USER1_SECOND_PAGE, 'rb') as file:
sample_api_bytes = file.read()
mock_res.read.return_value = sample_api_bytes
else:
raise ValueError("Unexpected url: " + url)
mock_res.read.return_value = b'{}'
return mock_res

def createTestUser(self, id):
Expand All @@ -85,7 +87,6 @@ def test2GetAllUsersMethods(self):

res = self.database.getAllUsersObj()
self.assertEqual(len(res),2)

rowTupleResOne = res[0].getAsRowTuple()
rowTupleTruth = (rowTupleResOne[0], #id value depends on which one was added first by multithreading, wholy unimportant
self.name,
Expand Down
210 changes: 210 additions & 0 deletions testing/liliuhms_post_api_page_one.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
[
{
"added": "Tue, 23 Mar 2021 03:12:03 GMT",
"attachments": [],
"content": "<p>Hello everyone!!! (happy halloweeeeen!)</p><p>So actually, I was thinking about it and I feel bad if you get charged tomorrow, November 1st, while my shop is open!!</p><p>I know many of you are planning to purchase something from me, which I so appreciate! Therefore I have decided to pause the November payment. Especially with holiday shopping coming up, I would rather you use your expenses towards that this month!</p><p>This being said, that means all of my digital content for November will come to you FREE OF CHARGE! It's my gift to you! Thank you for your support these last few months, and especially your patience! I will let you know when I will be resuming payments again!</p><p>Cheers!</p>",
"edited": "Sat, 31 Oct 2020 18:07:22 GMT",
"embed": {},
"file": {},
"id": "43376039",
"published": "Sat, 31 Oct 2020 18:07:22 GMT",
"service": "patreon",
"shared_file": false,
"title": "NOVEMBER BILLING PAUSED",
"user": "9210140"
},
{
"added": "Tue, 23 Mar 2021 03:27:16 GMT",
"attachments": [
{
"name": "halloween-1.png",
"path": "/44/ab/44ab1e45433ecf74f904d5e5a95dc33e144a22a511692a3cd0cadec0988490f9.png"
},
{
"name": "halloween-3.png",
"path": "/94/04/9404faf7b1f292d7ac70f28d9662cad0dd594638c0ee5360871e3052bbda0268.png"
},
{
"name": "halloween-2.png",
"path": "/28/f8/28f800dedf7d661677350b06432270b79deaac3480f3f7981d2cc52bfe9d128b.png"
},
{
"name": "halloween-4.png",
"path": "/04/a4/04a4d0b371469ea263bdc9c85ebc21156fd183d8646ce3c1287c9941b07b62ad.png"
},
{
"name": "Screenshot_2020-10-01_161603.png",
"path": "/a9/5d/a95dbbd84235acc361cce23ea22357be4ccdff68ed10ea5f467bd113f7da8204.png"
}
],
"content": "<p>this is a freebie for everybunny!</p><p>you can download all of them below!</p><p>enjoy!</p>",
"edited": "Thu, 01 Oct 2020 22:21:05 GMT",
"embed": {},
"file": {
"name": "Screenshot 2020-10-01 161603.png",
"path": "/a9/5d/a95dbbd84235acc361cce23ea22357be4ccdff68ed10ea5f467bd113f7da8204.png"
},
"id": "42261909",
"published": "Thu, 01 Oct 2020 22:21:05 GMT",
"service": "patreon",
"shared_file": false,
"title": "free to use october icons!",
"user": "9210140"
},
{
"added": "Tue, 23 Mar 2021 03:36:44 GMT",
"attachments": [
{
"name": "IMG_6707.jpg",
"path": "/a3/f1/a3f1cc650cc6151281875c7b328de452141bcbe82bea3c3c119b397b99f4cd65.jpg"
},
{
"name": "IMG_6714.jpg",
"path": "/84/51/84510edf95d1d727a5ecce7e3b84eae315c70a3f868076e50fed3fba51ea8404.jpg"
}
],
"content": "<p>AAAH FINALLY!! After some mishaps, the August patreon pins have arrived!!!!</p><p><br></p><p>I will be shipping these out this week, and I\u2019ll also upload the exclusive stationery each parcel is sent with afterwards!!!</p><p><br></p><p>Also, here\u2019s a peek at September\u2019s pin!! Many of you already guessed it\u2019s from Holland! \ud83c\udf37 </p>",
"edited": "Tue, 08 Sep 2020 18:46:20 GMT",
"embed": {},
"file": {
"name": "IMG_6707.jpg",
"path": "/a3/f1/a3f1cc650cc6151281875c7b328de452141bcbe82bea3c3c119b397b99f4cd65.jpg"
},
"id": "41388689",
"published": "Tue, 08 Sep 2020 18:46:20 GMT",
"service": "patreon",
"shared_file": false,
"title": "august pins shipping this week!",
"user": "9210140"
},
{
"added": "Tue, 23 Mar 2021 03:39:55 GMT",
"attachments": [
{
"name": "IMG_6235.jpg",
"path": "/37/5e/375e616b095891ecb24f52580a8af5f726d1f6a728e4d679a18b5041dedab7a2.jpg"
}
],
"content": "<p>hello everyone!!!</p><p>FINALLY my postcard tier items came!!! they look so cute!! There were a few sticker malfunctions on the free launch sticker sheet but hopefully I can get things figured out \ud83d\ude2d</p><p>Pin pal enamel pins should be here this week as well! I am gradually packing everything and hope to have all the August physical tier stuff out by next week!! Thank you SO much for your patience!</p><p><br></p><p>September pins will ship MUCH earlier than this one because I ordered it in advance this time!!! Yahoo!</p>",
"edited": "Tue, 01 Sep 2020 17:00:41 GMT",
"embed": {},
"file": {
"name": "IMG_6235.jpg",
"path": "/37/5e/375e616b095891ecb24f52580a8af5f726d1f6a728e4d679a18b5041dedab7a2.jpg"
},
"id": "41084915",
"published": "Mon, 31 Aug 2020 23:24:35 GMT",
"service": "patreon",
"shared_file": false,
"title": "august postcard + sticker!!",
"user": "9210140"
},
{
"added": "Tue, 23 Mar 2021 03:42:19 GMT",
"attachments": [
{
"name": "IMG_5816.jpg",
"path": "/ba/6a/ba6a868daeb48d8e3a0db0ff283f58718c63b872b4c42a16f09202870e38430b.jpg"
}
],
"content": "<p>hello my friends!!!!!</p><p>August pin pal club pins are finally finished!!!</p><p>(If you pledged at the end of July when Patreon launched, or before the end of this month, you will get this!)</p><p>Here\u2019s a photo from my manufacturer!!!</p><p>I\u2019ll be shipping out parcels through last week of August &amp; beginning of September!</p><p>If you have any address changes please send me a message! </p><p>Also, please give some time for packages to arrive, as USPS is in a really difficult spot right now.</p><p>Thanks so much for all your support this month!</p><p><br></p><p>Reminder that if you were a $15+ pledge during the launch week in July you\u2019ll also receive a sticker sheet.</p><p>(Also, can you spy the September pin in the back? I wonder what country it could be from?)</p>",
"edited": "Mon, 24 Aug 2020 18:53:12 GMT",
"embed": {},
"file": {
"name": "IMG_5816.jpg",
"path": "/ba/6a/ba6a868daeb48d8e3a0db0ff283f58718c63b872b4c42a16f09202870e38430b.jpg"
},
"id": "40801379",
"published": "Mon, 24 Aug 2020 13:35:18 GMT",
"service": "patreon",
"shared_file": false,
"title": "august pin pals!!!",
"user": "9210140"
},
{
"added": "Tue, 23 Mar 2021 03:49:42 GMT",
"attachments": [
{
"name": "august_patreon.png",
"path": "/34/24/34249db5b089d7a0f5bbe1006e600aaea40f5405bde6c967066892a2f98cfb8c.png"
}
],
"content": "<h3><em><strong>HEEHOOOOOOOO!!!!</strong></em></h3><p>Hello again my friends from across the globe!</p><p>Here is the <em>August postcard + sticker design</em> for all tiers that are <em><strong>Super Trooper and up ($35+)</strong></em></p><p>I'm probably going to have the monthly postcard tiers screenprinted locally with a print shop I love here!!! (so when you support my small business.... you're also supporting THEIR SMALL BUSINESS!!!!! small business ception...)</p><p>Also, I want to test out nice paper... this should be on French Press' speckletone white.. sexy paper...</p><p>I will also upload the high-res files for both of these in a separate private post so that you can print as many as you'd like for personal use.</p><p><br></p><p>Anywhooo!</p><p>Anyone who is in the Super Trooper tiers or higher before end of this month can get this exclusive postcard + sticker! (All physical tiers will ship near the end of the month or beginning of Sept. depending on when you pledged.)<br></p>",
"edited": "Tue, 04 Aug 2020 04:08:15 GMT",
"embed": {},
"file": {
"name": "august_patreon.png",
"path": "/34/24/34249db5b089d7a0f5bbe1006e600aaea40f5405bde6c967066892a2f98cfb8c.png"
},
"id": "40072994",
"published": "Tue, 04 Aug 2020 04:08:15 GMT",
"service": "patreon",
"shared_file": false,
"title": "August Postcard + Sticker ($35+ tiers)",
"user": "9210140"
},
{
"added": "Tue, 23 Mar 2021 03:53:35 GMT",
"attachments": [],
"content": "<p><strong>EDIT:</strong> Since everyone will be charged for the moment they first join I will be using those funds for August rewards, and pausing the August 1st charge.</p><p>-----</p><p>hello friends!<br>thank you SO much for checking out my patreon page, and for your support!!</p><p>because I am launching this patreon near the end of July, there will be a charge for when you first join.</p><p>i want to give <em><strong>all physical reward tiers who join before August 1st a bonus sticker sheet for this month!</strong></em></p><p>all rewards will be shipped near the end of august to give me time to produce them.</p><p>oh! and here is the pin design for the month of August! the country bun visits this month is Venezuela! I wonder what he learns and sees there? I guess we'll have to wait for his letter.</p><p><img data-media-id=\"71843041\" src=\"/8e/34/8e34c4eb22609401df85587ecda6b9bb4a71f2214f9d5b87fa9df3c6e42e61fe.png\"></p><p>again, thank you SO much for all the love and support! i hope this will be a fun thing for everyone!! during this pandemic it's been difficult to see people or travel, so I want these monthly letters &amp; souvenirs from bun to feel like a warm hug from a friend!</p>",
"edited": "Fri, 24 Jul 2020 23:15:59 GMT",
"embed": {},
"file": {},
"id": "39678704",
"published": "Fri, 24 Jul 2020 20:50:54 GMT",
"service": "patreon",
"shared_file": false,
"title": "welcome patrons!!! (first week patron bonus + august design)",
"user": "9210140"
},
{
"added": "Tue, 23 Mar 2021 04:08:49 GMT",
"attachments": [
{
"name": "Screen_Shot_2020-05-19_at_2.51.02_PM.png",
"path": "/de/5c/de5c8bed98e3ecdf659f5b3162cec369240cd187c816cfb60d518f4c6fe03e55.png"
},
{
"name": "Untitled_Artwork_(2).png",
"path": "/a0/9f/a09f6e7cdd224b59d44f0b8b88b1d8319fa0895aec6ec6e161eac437d819e0de.png"
},
{
"name": "van_duck_bg.jpg",
"path": "/4a/a0/4aa0021a217a4d9377a52e2aa0c2393e9466c9441396c851866d92fdc03cfc7a.jpg"
},
{
"name": "image0.jpeg",
"path": "/58/05/5805878b7bc5e217d1c6cebe47e575eafa5d087736e1c10d9de9dc521db096f6.jpg"
},
{
"name": "image1.png",
"path": "/e3/8c/e38cfceec967aeb155d84f9050cd2aa5bfe141096009d6ef10dab1cd9c7bf454.png"
},
{
"name": "cart_MASTER.png",
"path": "/6f/69/6f69b18d3cb9c53f5305602242bd50896abbdee4a28f39940eb9745a49f3814c.png"
},
{
"name": "shelf_MASTER.png",
"path": "/54/9b/549b1e4cadf22f20cfb7c5406eb2a76faa8b1a84b5cc553838e145816420a5a2.png"
},
{
"name": "building_side_MASTER.png",
"path": "/e1/23/e1236d75356fb9b857f52b17711445cba7d3cc3e952a0218bc1ee22ea9f9c3ef.png"
}
],
"content": "<p>hello patrons and perusers!!! \u00a0</p><p>this post is meant to give you an idea of the kind of behind-the-scenes stuff you'll see if you subscribe to one of my tiers!\u00a0</p><p>I have been working on a lot of branding and toy design lately for some of my characters in \"Jiji\" and am hoping to launch a kickstarter soon for a toy line! Here's some of the process work and spitballing of ideas I had for it!</p><p>Expect to see more work and images like this in paid tiers. A lot of these concepts and artworks won't be posted anywhere else!</p>",
"edited": "Tue, 19 May 2020 20:51:59 GMT",
"embed": {},
"file": {
"name": "Untitled_Artwork (2).png",
"path": "/de/5c/de5c8bed98e3ecdf659f5b3162cec369240cd187c816cfb60d518f4c6fe03e55.png"
},
"id": "37306299",
"published": "Tue, 19 May 2020 20:51:59 GMT",
"service": "patreon",
"shared_file": false,
"title": "first post! (public freebie)",
"user": "9210140"
}
]
Loading

0 comments on commit f4d6f96

Please sign in to comment.