Delete job related tests

This commit is contained in:
Tanner committed 2026-11-14 17:08:13 +00:00
1 parent 7d6fc8aa81
commit 971b98acde
21 files changed
+261 -3152

No files matched your search

+21
View File
@@ -163,6 +163,27 @@ class TestWebInventoryAPI(unittest.TestCase):
'(12, 64, -7)': 1,
})
def test_global_api_retries_if_live_dictionary_changes_during_snapshot(self):
class ChangingDict(dict):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.first_read = True
def items(self):
if self.first_read:
self.first_read = False
raise RuntimeError('dictionary changed size during iteration')
return super().items()
self.g.chest_viewers = ChangingDict({(12, 64, -7): 1})
response = self.client.get('/api/global')
self.assertEqual(response.status_code, 200)
self.assertEqual(response.get_json()['chest_viewers'], {
'(12, 64, -7)': 1,
})
def test_drop_endpoint_supports_one_stack_and_matching_actions(self):
one = self.client.post('/api/inventory/drop', json={
'slot': 9, 'action': 'one'})