Skip to content

Commit 680186c

Browse files
committed
updated tests
1 parent 64d3181 commit 680186c

File tree

2 files changed

+74
-65
lines changed

2 files changed

+74
-65
lines changed

api_v2/tests/responses/TestObjects.test_class_example.approved.json

Lines changed: 60 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
},
1616
"features": [
1717
{
18+
"data_for_class_table": [],
1819
"desc": "When you reach 4th level, and again at 8th, 12th, 16th, and 19th level, you can increase one ability score of your choice by 2, or you can increase two ability scores of your choice by 1. As normal, you can\u2019t increase an ability score above 20 using this feature.",
1920
"feature_type": "CLASS_FEATURE",
2021
"gained_at": [
@@ -40,10 +41,10 @@
4041
}
4142
],
4243
"key": "srd_barbarian_ability-score-improvement",
43-
"name": "Ability Score Improvement",
44-
"table_data": []
44+
"name": "Ability Score Improvement"
4545
},
4646
{
47+
"data_for_class_table": [],
4748
"desc": "Beginning at 9th level, you can roll one additional weapon damage die when determining the extra damage for a critical hit with a melee attack.\r\n\r\nThis increases to two additional dice at 13th level and three additional dice at 17th level.",
4849
"feature_type": "CLASS_FEATURE",
4950
"gained_at": [
@@ -61,10 +62,10 @@
6162
}
6263
],
6364
"key": "srd_barbarian_brutal-critical",
64-
"name": "Brutal Critical",
65-
"table_data": []
65+
"name": "Brutal Critical"
6666
},
6767
{
68+
"data_for_class_table": [],
6869
"desc": "At 2nd level, you gain an uncanny sense of when things nearby aren\u2019t as they should be, giving you an edge when you dodge away from danger.\r\n\r\nYou have advantage on Dexterity saving throws against effects that you can see, such as traps and spells. To gain this benefit, you can\u2019t be blinded, deafened, or incapacitated.",
6970
"feature_type": "CLASS_FEATURE",
7071
"gained_at": [
@@ -74,18 +75,18 @@
7475
}
7576
],
7677
"key": "srd_barbarian_danger-sense",
77-
"name": "Danger Sense",
78-
"table_data": []
78+
"name": "Danger Sense"
7979
},
8080
{
81+
"data_for_class_table": [],
8182
"desc": "You start with the following equipment, in addition to the equipment granted by your background:\r\n* (*a*) a greataxe or (*b*) any martial melee weapon\r\n* (*a*) two handaxes or (*b*) any simple weapon\r\n* An explorer\u2019s pack and four javelins",
8283
"feature_type": "STARTING_EQUIPMENT",
8384
"gained_at": [],
8485
"key": "srd_barbarian_equipment",
85-
"name": "Equipment",
86-
"table_data": []
86+
"name": "Equipment"
8787
},
8888
{
89+
"data_for_class_table": [],
8990
"desc": "Beginning at 5th level, you can attack twice, instead of once, whenever you take the Attack action on your turn.",
9091
"feature_type": "CLASS_FEATURE",
9192
"gained_at": [
@@ -95,10 +96,10 @@
9596
}
9697
],
9798
"key": "srd_barbarian_extra-attack",
98-
"name": "Extra Attack",
99-
"table_data": []
99+
"name": "Extra Attack"
100100
},
101101
{
102+
"data_for_class_table": [],
102103
"desc": "Starting at 5th level, your speed increases by 10 feet while you aren\u2019t wearing heavy armor.",
103104
"feature_type": "CLASS_FEATURE",
104105
"gained_at": [
@@ -108,10 +109,10 @@
108109
}
109110
],
110111
"key": "srd_barbarian_fast-movement",
111-
"name": "Fast Movement",
112-
"table_data": []
112+
"name": "Fast Movement"
113113
},
114114
{
115+
"data_for_class_table": [],
115116
"desc": "By 7th level, your instincts are so honed that you have advantage on initiative rolls.\r\n\r\nAdditionally, if you are surprised at the beginning of combat and aren\u2019t incapacitated, you can act normally on your first turn, but only if you enter your rage before doing anything else on that turn.",
116117
"feature_type": "CLASS_FEATURE",
117118
"gained_at": [
@@ -121,10 +122,10 @@
121122
}
122123
],
123124
"key": "srd_barbarian_feral-instinct",
124-
"name": "Feral Instinct",
125-
"table_data": []
125+
"name": "Feral Instinct"
126126
},
127127
{
128+
"data_for_class_table": [],
128129
"desc": "Beginning at 18th level, if your total for a Strength check is less than your Strength score, you can use that score in place of the total.",
129130
"feature_type": "CLASS_FEATURE",
130131
"gained_at": [
@@ -134,10 +135,10 @@
134135
}
135136
],
136137
"key": "srd_barbarian_indomitable-might",
137-
"name": "Indomitable Might",
138-
"table_data": []
138+
"name": "Indomitable Might"
139139
},
140140
{
141+
"data_for_class_table": [],
141142
"desc": "Beginning at 15th level, your rage is so fierce that it ends early only if you fall unconscious or if you choose to end it.",
142143
"feature_type": "CLASS_FEATURE",
143144
"gained_at": [
@@ -147,10 +148,10 @@
147148
}
148149
],
149150
"key": "srd_barbarian_persistent-rage",
150-
"name": "Persistent Rage",
151-
"table_data": []
151+
"name": "Persistent Rage"
152152
},
153153
{
154+
"data_for_class_table": [],
154155
"desc": "At 20th level, you embody the power of the wilds. Your Strength and Constitution scores increase by 4. Your maximum for those scores is now 24.",
155156
"feature_type": "CLASS_FEATURE",
156157
"gained_at": [
@@ -160,10 +161,10 @@
160161
}
161162
],
162163
"key": "srd_barbarian_primal-champion",
163-
"name": "Primal Champion",
164-
"table_data": []
164+
"name": "Primal Champion"
165165
},
166166
{
167+
"data_for_class_table": [],
167168
"desc": "At 3rd level, you choose a path that shapes the nature of your rage. Choose the Path of the Berserker or the Path of the Totem Warrior, both detailed at the end of the class description. Your choice grants you features at 3rd level and again at 6th, 10th, and 14th levels.",
168169
"feature_type": "CLASS_FEATURE",
169170
"gained_at": [
@@ -173,24 +174,18 @@
173174
}
174175
],
175176
"key": "srd_barbarian_primal-path",
176-
"name": "Primal Path",
177-
"table_data": []
177+
"name": "Primal Path"
178178
},
179179
{
180+
"data_for_class_table": [],
180181
"desc": "**Armor:** Light armor, medium armor, shields\r\n**Weapons:** Simple weapons, martial weapons\r\n**Tools:** None\r\n**Saving Throws:** Strength, Constitution\r\n**Skills:** Choose two from Animal Handling, Athletics, Intimidation, Nature, Perception, and Survival",
181182
"feature_type": "PROFICIENCIES",
182183
"gained_at": [],
183184
"key": "srd_barbarian_proficiencies",
184-
"name": "Proficiencies",
185-
"table_data": []
185+
"name": "Proficiencies"
186186
},
187187
{
188-
"desc": "[Column data]",
189-
"feature_type": "PROFICIENCY_BONUS",
190-
"gained_at": [],
191-
"key": "srd_barbarian_proficiency-bonus",
192-
"name": "Proficiency Bonus",
193-
"table_data": [
188+
"data_for_class_table": [
194189
{
195190
"column_value": "+2",
196191
"level": 1
@@ -271,9 +266,15 @@
271266
"column_value": "+4",
272267
"level": 9
273268
}
274-
]
269+
],
270+
"desc": "[Column data]",
271+
"feature_type": "PROFICIENCY_BONUS",
272+
"gained_at": [],
273+
"key": "srd_barbarian_proficiency-bonus",
274+
"name": "Proficiency Bonus"
275275
},
276276
{
277+
"data_for_class_table": [],
277278
"desc": "In battle, you fight with primal ferocity. On your turn, you can enter a rage as a bonus action.\r\n\r\nWhile raging, you gain the following benefits if you aren't wearing heavy armor:\r\n\r\n* You have advantage on Strength checks and Strength saving throws.\r\n* When you make a melee weapon attack using Strength, you gain a bonus to the damage roll that increases as you gain levels as a barbarian, as shown in the Rage Damage column of the Barbarian table.\r\n* You have resistance to bludgeoning, piercing, and slashing damage. \r\n\r\nIf you are able to cast spells, you can't cast them or concentrate on them while raging.\r\n\r\nYour rage lasts for 1 minute. It ends early if you are knocked unconscious or if your turn ends and you haven't attacked a hostile creature since your last turn or taken damage since then. You can also end your rage on your turn as a bonus action.\r\n\r\nOnce you have raged the number of times shown for your barbarian level in the Rages column of the Barbarian table, you must finish a long rest before you can rage again.",
278279
"feature_type": "CLASS_FEATURE",
279280
"gained_at": [
@@ -283,16 +284,10 @@
283284
}
284285
],
285286
"key": "srd_barbarian_rage",
286-
"name": "Rage",
287-
"table_data": []
287+
"name": "Rage"
288288
},
289289
{
290-
"desc": "[Column data]",
291-
"feature_type": "CLASS_FEATURE",
292-
"gained_at": [],
293-
"key": "srd_barbarian_rage-damage",
294-
"name": "Rage Damage",
295-
"table_data": [
290+
"data_for_class_table": [
296291
{
297292
"column_value": "+2",
298293
"level": 1
@@ -373,15 +368,15 @@
373368
"column_value": "+3",
374369
"level": 9
375370
}
376-
]
377-
},
378-
{
371+
],
379372
"desc": "[Column data]",
380373
"feature_type": "CLASS_FEATURE",
381374
"gained_at": [],
382-
"key": "srd_barbarian_rages",
383-
"name": "Rages",
384-
"table_data": [
375+
"key": "srd_barbarian_rage-damage",
376+
"name": "Rage Damage"
377+
},
378+
{
379+
"data_for_class_table": [
385380
{
386381
"column_value": "2",
387382
"level": 1
@@ -462,9 +457,15 @@
462457
"column_value": "4",
463458
"level": 9
464459
}
465-
]
460+
],
461+
"desc": "[Column data]",
462+
"feature_type": "CLASS_FEATURE",
463+
"gained_at": [],
464+
"key": "srd_barbarian_rages",
465+
"name": "Rages"
466466
},
467467
{
468+
"data_for_class_table": [],
468469
"desc": "Starting at 2nd level, you can throw aside all concern for defense to attack with fierce desperation. When you make your first attack on your turn, you can decide to attack recklessly. Doing so gives you advantage on melee weapon attack rolls using Strength during this turn, but attack rolls against you have advantage until your next turn.",
469470
"feature_type": "CLASS_FEATURE",
470471
"gained_at": [
@@ -474,10 +475,10 @@
474475
}
475476
],
476477
"key": "srd_barbarian_reckless-attack",
477-
"name": "Reckless Attack",
478-
"table_data": []
478+
"name": "Reckless Attack"
479479
},
480480
{
481+
"data_for_class_table": [],
481482
"desc": "Starting at 11th level, your rage can keep you fighting despite grievous wounds. If you drop to 0 hit points while you\u2019re raging and don\u2019t die outright, you can make a DC 10 Constitution saving throw. If you succeed, you drop to 1 hit point instead.\r\n\r\nEach time you use this feature after the first, the DC increases by 5. When you finish a short or long rest, the DC resets to 10.",
482483
"feature_type": "CLASS_FEATURE",
483484
"gained_at": [
@@ -487,10 +488,10 @@
487488
}
488489
],
489490
"key": "srd_barbarian_relentless-rage",
490-
"name": "Relentless Rage",
491-
"table_data": []
491+
"name": "Relentless Rage"
492492
},
493493
{
494+
"data_for_class_table": [],
494495
"desc": "While you are not wearing any armor, your Armor Class equals 10 + your Dexterity modifier + your Constitution modifier. You can use a shield and still gain this benefit.",
495496
"feature_type": "CLASS_FEATURE",
496497
"gained_at": [
@@ -500,8 +501,7 @@
500501
}
501502
],
502503
"key": "srd_barbarian_unarmored-defense",
503-
"name": "Unarmored Defense",
504-
"table_data": []
504+
"name": "Unarmored Defense"
505505
}
506506
],
507507
"hit_dice": "D12",
@@ -514,8 +514,14 @@
514514
"key": "srd_barbarian",
515515
"name": "Barbarian",
516516
"saving_throws": [
517-
"http://localhost:8000/v2/abilities/con/",
518-
"http://localhost:8000/v2/abilities/str/"
517+
{
518+
"name": "Constitution",
519+
"url": "http://localhost:8000/v2/abilities/con/"
520+
},
521+
{
522+
"name": "Strength",
523+
"url": "http://localhost:8000/v2/abilities/str/"
524+
}
519525
],
520526
"subclass_of": null,
521527
"url": "http://localhost:8000/v2/classes/srd_barbarian/"

api_v2/tests/responses/TestObjects.test_subclass_example.approved.json

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
},
1616
"features": [
1717
{
18+
"data_for_class_table": [],
1819
"desc": "Starting at 3rd level, you can use the bonus action granted by your Cunning Action to make a Dexterity (Sleight of Hand) check, use your thieves' tools to disarm a trap or open a lock, or take the Use an Object action.",
1920
"feature_type": "CLASS_FEATURE",
2021
"gained_at": [
@@ -24,10 +25,10 @@
2425
}
2526
],
2627
"key": "srd_thief_fast-hands",
27-
"name": "Fast Hands",
28-
"table_data": []
28+
"name": "Fast Hands"
2929
},
3030
{
31+
"data_for_class_table": [],
3132
"desc": "When you choose this archetype at 3rd level, you gain the ability to climb faster than normal; climbing no longer costs you extra movement.\r\n\r\nIn addition, when you make a running jump, the distance you cover increases by a number of feet equal to your Dexterity modifier.",
3233
"feature_type": "CLASS_FEATURE",
3334
"gained_at": [
@@ -37,10 +38,10 @@
3738
}
3839
],
3940
"key": "srd_thief_second-story-work",
40-
"name": "Second-Story Work",
41-
"table_data": []
41+
"name": "Second-Story Work"
4242
},
4343
{
44+
"data_for_class_table": [],
4445
"desc": "Starting at 9th level, you have advantage on a Dexterity (Stealth) check if you move no more than half your speed on the same turn.",
4546
"feature_type": "CLASS_FEATURE",
4647
"gained_at": [
@@ -50,10 +51,10 @@
5051
}
5152
],
5253
"key": "srd_thief_supreme-sneak",
53-
"name": "Supreme Sneak",
54-
"table_data": []
54+
"name": "Supreme Sneak"
5555
},
5656
{
57+
"data_for_class_table": [],
5758
"desc": "When you reach 17th level, you have become adept at laying ambushes and quickly escaping danger. You can take two turns during the first round of any combat. You take your first turn at your normal initiative and your second turn at your initiative minus 10. You can't use this feature when you are surprised.",
5859
"feature_type": "CLASS_FEATURE",
5960
"gained_at": [
@@ -63,10 +64,10 @@
6364
}
6465
],
6566
"key": "srd_thief_thiefs-reflexes",
66-
"name": "Thief's Reflexes",
67-
"table_data": []
67+
"name": "Thief's Reflexes"
6868
},
6969
{
70+
"data_for_class_table": [],
7071
"desc": "By 13th level, you have learned enough about the workings of magic that you can improvise the use of items even when they are not intended for you. You ignore all class, race, and level requirements on the use of magic items.",
7172
"feature_type": "CLASS_FEATURE",
7273
"gained_at": [
@@ -76,14 +77,16 @@
7677
}
7778
],
7879
"key": "srd_thief_use-magic-device",
79-
"name": "Use Magic Device",
80-
"table_data": []
80+
"name": "Use Magic Device"
8181
}
8282
],
8383
"hit_dice": null,
8484
"key": "srd_thief",
8585
"name": "Thief",
8686
"saving_throws": [],
87-
"subclass_of": "http://localhost:8000/v2/classes/srd_rogue/",
87+
"subclass_of": {
88+
"key": "srd_rogue",
89+
"name": "Rogue"
90+
},
8891
"url": "http://localhost:8000/v2/classes/srd_thief/"
8992
}

0 commit comments

Comments
 (0)