Skip to content

Commit

Permalink
Move test data to dedicated files.
Browse files Browse the repository at this point in the history
  • Loading branch information
airforce270 committed Nov 20, 2023
1 parent ffe3529 commit 19460dc
Show file tree
Hide file tree
Showing 35 changed files with 1,618 additions and 32 deletions.
8 changes: 6 additions & 2 deletions apiclients/bible/bibletest/bibletest.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// Package bibletest provides helpers for testing connections to the Bible API.
package bibletest

import _ "embed"

var (
LookupVerseSingleVerse1Resp = `{"reference":"Philippians 4:8","verses":[{"book_id":"PHP","book_name":"Philippians","chapter":4,"verse":8,"text":"Finally, brothers, whatever things are true, whatever things are honorable, whatever things are just, whatever things are pure, whatever things are lovely, whatever things are of good report; if there is any virtue, and if there is any praise, think about these things.\n"}],"text":"Finally, brothers, whatever things are true, whatever things are honorable, whatever things are just, whatever things are pure, whatever things are lovely, whatever things are of good report; if there is any virtue, and if there is any praise, think about these things.\n","translation_id":"web","translation_name":"World English Bible","translation_note":"Public Domain"}`
LookupVerseSingleVerse2Resp = `{"reference":"John 3:16","verses":[{"book_id":"JHN","book_name":"John","chapter":3,"verse":16,"text":"\nFor God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\n\n"}],"text":"\nFor God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\n\n","translation_id":"web","translation_name":"World English Bible","translation_note":"Public Domain"}`
//go:embed lookup_verse/single_verse_1.json
LookupVerseSingleVerse1Resp string
//go:embed lookup_verse/single_verse_2.json
LookupVerseSingleVerse2Resp string
)
16 changes: 16 additions & 0 deletions apiclients/bible/bibletest/lookup_verse/single_verse_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"reference": "Philippians 4:8",
"verses": [
{
"book_id": "PHP",
"book_name": "Philippians",
"chapter": 4,
"verse": 8,
"text": "Finally, brothers, whatever things are true, whatever things are honorable, whatever things are just, whatever things are pure, whatever things are lovely, whatever things are of good report; if there is any virtue, and if there is any praise, think about these things.\n"
}
],
"text": "Finally, brothers, whatever things are true, whatever things are honorable, whatever things are just, whatever things are pure, whatever things are lovely, whatever things are of good report; if there is any virtue, and if there is any praise, think about these things.\n",
"translation_id": "web",
"translation_name": "World English Bible",
"translation_note": "Public Domain"
}
16 changes: 16 additions & 0 deletions apiclients/bible/bibletest/lookup_verse/single_verse_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"reference": "John 3:16",
"verses": [
{
"book_id": "JHN",
"book_name": "John",
"chapter": 3,
"verse": 16,
"text": "\nFor God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\n\n"
}
],
"text": "\nFor God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\n\n",
"translation_id": "web",
"translation_name": "World English Bible",
"translation_note": "Public Domain"
}
3 changes: 3 additions & 0 deletions apiclients/ivr/ivrtest/founders/none.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"founders": []
}
7 changes: 7 additions & 0 deletions apiclients/ivr/ivrtest/founders/none_404.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"statusCode": 404,
"requestID": "6e26880e-7b25-448d-bef5-f35c1f41afab",
"error": {
"message": "Specified user has no founders."
}
}
74 changes: 74 additions & 0 deletions apiclients/ivr/ivrtest/founders/normal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"founders": [
{
"isSubscribed": false,
"entitlementStart": "2022-07-31T00:41:06Z",
"id": "415575292",
"login": "fishyykingyy",
"displayName": "FishyyKingyy"
},
{
"isSubscribed": false,
"entitlementStart": "2022-08-13T19:46:18Z",
"id": "267287250",
"login": "eljulidi1337",
"displayName": "eljulidi1337"
},
{
"isSubscribed": true,
"entitlementStart": "2022-08-16T15:24:49Z",
"id": "89075062",
"login": "sammist",
"displayName": "SamMist"
},
{
"isSubscribed": true,
"entitlementStart": "2022-08-16T15:41:52Z",
"id": "190634299",
"login": "leochansz",
"displayName": "Leochansz"
},
{
"isSubscribed": false,
"entitlementStart": "2022-08-17T05:07:54Z",
"id": "143232353",
"login": "lexieuzumaki7",
"displayName": "lexieuzumaki7"
},
{
"isSubscribed": false,
"entitlementStart": "2022-08-17T21:44:28Z",
"id": "65602310",
"login": "contravz",
"displayName": "ContraVz"
},
{
"isSubscribed": true,
"entitlementStart": "2022-08-18T00:41:48Z",
"id": "232875294",
"login": "rott______",
"displayName": "rott______"
},
{
"isSubscribed": false,
"entitlementStart": "2022-08-18T00:48:10Z",
"id": "610912094",
"login": "dankjuicer",
"displayName": "DankJuicer"
},
{
"isSubscribed": false,
"entitlementStart": "2022-08-20T20:39:11Z",
"id": "671024739",
"login": "kronikz____",
"displayName": "kronikZ____"
},
{
"isSubscribed": true,
"entitlementStart": "2022-08-24T01:48:53Z",
"id": "408538669",
"login": "blemplob",
"displayName": "blemplob"
}
]
}
56 changes: 38 additions & 18 deletions apiclients/ivr/ivrtest/ivrtest.go
Original file line number Diff line number Diff line change
@@ -1,27 +1,47 @@
// Package ivrtest provides helpers for testing connections to the IVR API.
package ivrtest

import _ "embed"

var (
TwitchUsersNotStreamingResp = `[{"banned":false,"displayName":"xQc","login":"xqc","id":"71092938","bio":"THE BEST AT ABSOLUTELY EVERYTHING. THE JUICER. LEADER OF THE JUICERS.","follows":207,"followers":11226373,"profileViewCount":524730962,"chatColor":"#0000FF","logo":"https://static-cdn.jtvnw.net/jtv_user_pictures/xqc-profile_image-9298dca608632101-600x600.jpeg","banner":"https://static-cdn.jtvnw.net/jtv_user_pictures/83e86af1-9a6c-42b1-98e2-3f6238a744b5-profile_banner-480.png","verifiedBot":false,"createdAt":"2014-09-12T23:50:05.989719Z","updatedAt":"2022-10-06T20:43:00.256907Z","emotePrefix":"xqc","roles":{"isAffiliate":false,"isPartner":true,"isStaff":null},"badges":[{"setID":"partner","title":"Verified","description":"Verified","version":"1"}],"chatSettings":{"chatDelayMs":0,"followersOnlyDurationMinutes":1440,"slowModeDurationSeconds":null,"blockLinks":false,"isSubscribersOnlyModeEnabled":false,"isEmoteOnlyModeEnabled":false,"isFastSubsModeEnabled":false,"isUniqueChatModeEnabled":false,"requireVerifiedAccount":false,"rules":["English please","Fresh memes"]},"stream":null,"lastBroadcast":{"startedAt":"2022-10-06T22:47:39.840638Z","title":"🟧JUICED EP2. !FANSLY🟧CLICK NOW🟧FT. JERMA🟧& AUSTIN🟧& LUDWIG🟧& CONNOREATSPANTS🟧& ME🟧JOIN NOW🟧FAST🟧BEFORE I LOSE IT🟧BIG🟧#SPONSORED"},"panels":[{"id":"124112525"},{"id":"98109996"},{"id":"44997828"},{"id":"32221884"},{"id":"12592823"},{"id":"6720150"},{"id":"77693957"},{"id":"12592818"},{"id":"8847001"},{"id":"22113669"},{"id":"8847029"},{"id":"22360616"},{"id":"14506832"},{"id":"22360618"}]}]`
TwitchUsersStreamingResp = `[{"banned":false,"displayName":"xQt0001","login":"xqt0001","id":"591140996","bio":"GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA GAMBA ","follows":144,"followers":1940,"profileViewCount":190,"chatColor":"#FDFF00","logo":"https://static-cdn.jtvnw.net/jtv_user_pictures/a5fecb44-bb38-4739-aa04-371cc1ea4152-profile_image-600x600.png","banner":"https://static-cdn.jtvnw.net/jtv_user_pictures/fb78db5c-0078-4e85-bfe1-f527f19d9a22-profile_banner-480.jpeg","verifiedBot":false,"createdAt":"2020-10-02T16:25:47.819212Z","updatedAt":"2022-10-09T03:41:23.622605Z","emotePrefix":"xqt000","roles":{"isAffiliate":true,"isPartner":false,"isStaff":null},"badges":[{"setID":"premium","title":"Prime Gaming","description":"Prime Gaming","version":"1"}],"chatSettings":{"chatDelayMs":0,"followersOnlyDurationMinutes":null,"slowModeDurationSeconds":null,"blockLinks":false,"isSubscribersOnlyModeEnabled":false,"isEmoteOnlyModeEnabled":false,"isFastSubsModeEnabled":false,"isUniqueChatModeEnabled":false,"requireVerifiedAccount":false,"rules":[]},"stream":{"title":"tiktok esport #228 i guess","id":"39929884600","createdAt":"2022-10-09T22:00:33Z","type":"live","viewersCount":77,"game":{"displayName":"Just Chatting"}},"lastBroadcast":{"startedAt":"2022-10-09T22:00:37.637909Z","title":"tiktok esport #228 i guess"},"panels":[]}]`
TwitchUsersBannedResp = `[{"banned":true,"banReason":"TOS_INDEFINITE","displayName":"SeaGrade","login":"seagrade","id":"245821818","bio":"unbanned","follows":5,"followers":0,"profileViewCount":150,"chatColor":"#00EBFF","logo":"https://static-cdn.jtvnw.net/jtv_user_pictures/2cbd05a5-5502-4e42-924b-f889dc2221f7-profile_image-600x600.png","banner":"https://static-cdn.jtvnw.net/jtv_user_pictures/f6d8baf2-f2bf-4098-a4b7-f9945bd42ff7-profile_banner-480.jpeg","verifiedBot":false,"createdAt":"2018-08-05T23:43:51.848531Z","updatedAt":"2022-10-04T22:24:03.192561Z","emotePrefix":"","roles":{"isAffiliate":false,"isPartner":false,"isStaff":null},"badges":[{"setID":"glhf-pledge","title":"GLHF Pledge","description":"Signed the GLHF pledge in support for inclusive gaming communities","version":"1"}],"chatSettings":{"chatDelayMs":0,"followersOnlyDurationMinutes":null,"slowModeDurationSeconds":null,"blockLinks":true,"isSubscribersOnlyModeEnabled":false,"isEmoteOnlyModeEnabled":false,"isFastSubsModeEnabled":false,"isUniqueChatModeEnabled":false,"requireVerifiedAccount":true,"rules":[]},"stream":null,"lastBroadcast":{"startedAt":"2018-09-02T23:43:41.435181Z","title":"OBS TEST"},"panels":[{"id":"88030436"}]}]`
//go:embed twitch_users/not_streaming.json
TwitchUsersNotStreamingResp string
//go:embed twitch_users/streaming.json
TwitchUsersStreamingResp string
//go:embed twitch_users/banned.json
TwitchUsersBannedResp string

TwitchUsersNotVerifiedBotResp = `[{"banned":false,"displayName":"xQc","login":"xqc","id":"71092938","bio":"THE BEST AT ABSOLUTELY EVERYTHING. THE JUICER. LEADER OF THE JUICERS.","follows":207,"followers":11226373,"profileViewCount":524730962,"chatColor":"#0000FF","logo":"https://static-cdn.jtvnw.net/jtv_user_pictures/xqc-profile_image-9298dca608632101-600x600.jpeg","banner":"https://static-cdn.jtvnw.net/jtv_user_pictures/83e86af1-9a6c-42b1-98e2-3f6238a744b5-profile_banner-480.png","verifiedBot":false,"createdAt":"2014-09-12T23:50:05.989719Z","updatedAt":"2022-10-06T20:43:00.256907Z","emotePrefix":"xqc","roles":{"isAffiliate":false,"isPartner":true,"isStaff":null},"badges":[{"setID":"partner","title":"Verified","description":"Verified","version":"1"}],"chatSettings":{"chatDelayMs":0,"followersOnlyDurationMinutes":1440,"slowModeDurationSeconds":null,"blockLinks":false,"isSubscribersOnlyModeEnabled":false,"isEmoteOnlyModeEnabled":false,"isFastSubsModeEnabled":false,"isUniqueChatModeEnabled":false,"requireVerifiedAccount":false,"rules":["English please","Fresh memes"]},"stream":null,"lastBroadcast":{"startedAt":"2022-10-06T22:47:39.840638Z","title":"🟧JUICED EP2. !FANSLY🟧CLICK NOW🟧FT. JERMA🟧& AUSTIN🟧& LUDWIG🟧& CONNOREATSPANTS🟧& ME🟧JOIN NOW🟧FAST🟧BEFORE I LOSE IT🟧BIG🟧#SPONSORED"},"panels":[{"id":"124112525"},{"id":"98109996"},{"id":"44997828"},{"id":"32221884"},{"id":"12592823"},{"id":"6720150"},{"id":"77693957"},{"id":"12592818"},{"id":"8847001"},{"id":"22113669"},{"id":"8847029"},{"id":"22360616"},{"id":"14506832"},{"id":"22360618"}]}]`
TwitchUsersVerifiedBotResp = `[{"banned":false,"displayName":"iP0G","login":"ip0g","id":"429509069","bio":"very p0g","follows":136,"followers":63,"profileViewCount":658,"chatColor":"#00FFFF","logo":"https://static-cdn.jtvnw.net/jtv_user_pictures/dd669686-7694-418f-bd83-5ad418b5bb3b-profile_image-600x600.png","banner":null,"verifiedBot":true,"createdAt":"2019-04-12T05:34:52.280629Z","updatedAt":"2022-09-16T00:10:21.56657Z","emotePrefix":"","roles":{"isAffiliate":false,"isPartner":false,"isStaff":null},"badges":[{"setID":"game-developer","title":"Game Developer","description":"Game Developer for:","version":"1"}],"chatSettings":{"chatDelayMs":0,"followersOnlyDurationMinutes":0,"slowModeDurationSeconds":null,"blockLinks":false,"isSubscribersOnlyModeEnabled":false,"isEmoteOnlyModeEnabled":false,"isFastSubsModeEnabled":false,"isUniqueChatModeEnabled":false,"requireVerifiedAccount":false,"rules":[]},"stream":null,"lastBroadcast":{"startedAt":"2022-03-04T05:45:02.37469Z","title":null},"panels":[{"id":"123839619"}]}]`
//go:embed twitch_users/not_verified_bot.json
TwitchUsersNotVerifiedBotResp string
//go:embed twitch_users/verified_bot.json
TwitchUsersVerifiedBotResp string

ModsAndVIPsNoneResp = `{"mods":[],"vips":[],"ttl":1016}`
ModsAndVIPsModsOnlyResp = `{"mods":[{"id":"429509069","login":"ip0g","displayName":"iP0G","grantedAt":"2022-10-03T19:55:00.137915435Z"},{"id":"834890604","login":"af2bot","displayName":"af2bot","grantedAt":"2022-10-09T08:13:17.829797513Z"}],"vips":[],"ttl":null}`
ModsAndVIPsModsAndVIPsResp = `{"mods":[{"id":"100135110","login":"streamelements","displayName":"StreamElements","grantedAt":"2018-07-24T08:29:21.757709759Z"},{"id":"237719657","login":"fossabot","displayName":"Fossabot","grantedAt":"2020-08-16T20:51:55.198556309Z"},{"id":"191202519","login":"spintto","displayName":"spintto","grantedAt":"2022-03-08T14:59:43.671830635Z"},{"id":"514751411","login":"hnoace","displayName":"HNoAce","grantedAt":"2022-08-09T13:35:14.99544541Z"}],"vips":[{"id":"150790620","login":"bakonsword","displayName":"bakonsword","grantedAt":"2022-02-20T19:39:12.355546493Z"},{"id":"145484970","login":"alyjiaht_t","displayName":"alyjiahT_T","grantedAt":"2022-02-25T05:42:16.048233372Z"},{"id":"205748697","login":"avbest","displayName":"AVBest","grantedAt":"2022-03-08T14:31:49.869620222Z"},{"id":"69184756","login":"zaintew_","displayName":"Zaintew_","grantedAt":"2022-09-17T21:43:57.737612548Z"},{"id":"505131195","login":"captkayy","displayName":"captkayy","grantedAt":"2022-09-25T20:15:59.332859708Z"},{"id":"425925187","login":"seagrad","displayName":"seagrad","grantedAt":"2022-10-05T05:51:51.432004125Z"},{"id":"222316577","login":"dafkeee","displayName":"Dafkeee","grantedAt":"2022-10-05T05:52:02.130647633Z"}],"ttl":494}`
//go:embed mods_and_vips/none.json
ModsAndVIPsNoneResp string
//go:embed mods_and_vips/mods_only.json
ModsAndVIPsModsOnlyResp string
//go:embed mods_and_vips/mods_and_vips.json
ModsAndVIPsModsAndVIPsResp string

FoundersNone404Resp = `{"statusCode":404,"requestID":"6e26880e-7b25-448d-bef5-f35c1f41afab","error":{"message":"Specified user has no founders."}}`
FoundersNoneResp = `{"founders":[]}`
FoundersNormalResp = `{"founders":[{"isSubscribed":false,"entitlementStart":"2022-07-31T00:41:06Z","id":"415575292","login":"fishyykingyy","displayName":"FishyyKingyy"},{"isSubscribed":false,"entitlementStart":"2022-08-13T19:46:18Z","id":"267287250","login":"eljulidi1337","displayName":"eljulidi1337"},{"isSubscribed":true,"entitlementStart":"2022-08-16T15:24:49Z","id":"89075062","login":"sammist","displayName":"SamMist"},{"isSubscribed":true,"entitlementStart":"2022-08-16T15:41:52Z","id":"190634299","login":"leochansz","displayName":"Leochansz"},{"isSubscribed":false,"entitlementStart":"2022-08-17T05:07:54Z","id":"143232353","login":"lexieuzumaki7","displayName":"lexieuzumaki7"},{"isSubscribed":false,"entitlementStart":"2022-08-17T21:44:28Z","id":"65602310","login":"contravz","displayName":"ContraVz"},{"isSubscribed":true,"entitlementStart":"2022-08-18T00:41:48Z","id":"232875294","login":"rott______","displayName":"rott______"},{"isSubscribed":false,"entitlementStart":"2022-08-18T00:48:10Z","id":"610912094","login":"dankjuicer","displayName":"DankJuicer"},{"isSubscribed":false,"entitlementStart":"2022-08-20T20:39:11Z","id":"671024739","login":"kronikz____","displayName":"kronikZ____"},{"isSubscribed":true,"entitlementStart":"2022-08-24T01:48:53Z","id":"408538669","login":"blemplob","displayName":"blemplob"}]}`
//go:embed founders/none_404.json
FoundersNone404Resp string
//go:embed founders/none.json
FoundersNoneResp string
//go:embed founders/normal.json
FoundersNormalResp string

SubAgeCurrentPaidTier3Resp = `{"user":{"id":"460691477","login":"macroblank1","displayName":"Macroblank1"},"channel":{"id":"71092938","login":"xqc","displayName":"xQc"},"statusHidden":false,"followedAt":"2021-06-29T07:37:31Z","streak":{"elapsedDays":27,"daysRemaining":3,"months":17,"end":"2023-01-25T00:00:00Z","start":"2023-01-01T05:31:26Z"},"cumulative":{"elapsedDays":27,"daysRemaining":3,"months":17,"end":"2023-01-25T00:00:00Z","start":"2023-01-01T05:31:26Z"},"meta":{"type":"paid","tier":"3","endsAt":"2023-02-01T05:31:23Z","renewsAt":null,"giftMeta":null}}`
SubAgeCurrentGiftTier1Resp = `{"user":{"id":"46620027","login":"ellagarten","displayName":"ellagarten"},"channel":{"id":"71092938","login":"xqc","displayName":"xQc"},"statusHidden":false,"followedAt":"2020-04-04T22:31:11Z","streak":{"elapsedDays":17,"daysRemaining":14,"months":4,"end":"2023-02-05T21:47:32Z","start":"2023-01-05T00:00:00Z"},"cumulative":{"elapsedDays":17,"daysRemaining":14,"months":17,"end":"2023-02-05T21:47:32Z","start":"2023-01-05T00:00:00Z"},"meta":{"type":"gift","tier":"1","endsAt":"2023-02-05T21:47:32Z","renewsAt":null,"giftMeta":{"giftDate":"2022-11-05T21:47:33.094141514Z","gifter":{"id":"150839051","login":"takanatsume_","displayName":"TakaNatsume_"}}}}`
SubAgeCurrentPrimeResp = `{"user":{"id":"181950834","login":"airforce2700","displayName":"airforce2700"},"channel":{"id":"71092938","login":"xqc","displayName":"xQc"},"statusHidden":false,"followedAt":"2019-10-14T03:10:31Z","streak":{"elapsedDays":29,"daysRemaining":1,"months":22,"end":"2023-01-23T18:46:37Z","start":"2022-12-23T18:46:37Z"},"cumulative":{"elapsedDays":29,"daysRemaining":1,"months":22,"end":"2023-01-23T18:46:37Z","start":"2022-12-23T18:46:37Z"},"meta":{"type":"prime","tier":"1","endsAt":"2023-01-23T18:46:37Z","renewsAt":null,"giftMeta":null}}`
SubAgePreviousSubResp = `{"user":{"id":"181950834","login":"airforce2700","displayName":"airforce2700"},"channel":{"id":"186352304","login":"elis","displayName":"elis"},"statusHidden":false,"followedAt":"2021-11-11T17:47:35Z","streak":null,"cumulative":{"elapsedDays":31,"daysRemaining":0,"months":4,"end":"2023-01-20T20:48:38Z","start":"2022-12-20T20:48:38Z"},"meta":null}`
SubAgeNeverSubbedResp = `{"user":{"id":"181950834","login":"airforce2700","displayName":"airforce2700"},"channel":{"id":"207813352","login":"hasanabi","displayName":"HasanAbi"},"statusHidden":false,"followedAt":"2022-09-20T02:39:51Z","streak":null,"cumulative":null,"meta":null}`
SubAge404UserResp = `{"statusCode":404,"requestID":"c0ac8196-e6dc-4918-a974-ed48b516f9a8","error":{"message":"User was not found"}}`
SubAge404ChannelResp = `{"statusCode":404,"requestID":"b5705a1d-ab47-445a-8f7d-dcfeceea8d74","error":{"message":"Channel was not found"}}`
//go:embed sub_age/current_paid_tier3.json
SubAgeCurrentPaidTier3Resp string
//go:embed sub_age/current_gift_tier1.json
SubAgeCurrentGiftTier1Resp string
//go:embed sub_age/current_prime.json
SubAgeCurrentPrimeResp string
//go:embed sub_age/previous_sub.json
SubAgePreviousSubResp string
//go:embed sub_age/never_subbed.json
SubAgeNeverSubbedResp string
//go:embed sub_age/404_user.json
SubAge404UserResp string
//go:embed sub_age/404_channel.json
SubAge404ChannelResp string
)
Loading

0 comments on commit 19460dc

Please sign in to comment.