diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-05 14:03:47 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-05 14:03:47 +0100 |
| commit | 062696d31cc21e37b44e8c23e40ece9076cc22e5 (patch) | |
| tree | d3b6f684236f4de135285528ddf4f06c568c0a88 /tests/integration/test_statefile.py | |
| parent | d620e4c3ea42b0df6eb5e8dab92d7a8f031fa617 (diff) | |
Fix: Restoring a state file doubled every completed count
Diffstat (limited to 'tests/integration/test_statefile.py')
| -rw-r--r-- | tests/integration/test_statefile.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/integration/test_statefile.py b/tests/integration/test_statefile.py index 2a2d147..9f6db01 100644 --- a/tests/integration/test_statefile.py +++ b/tests/integration/test_statefile.py | |||
| @@ -30,6 +30,7 @@ class StateFileRoundTrip(TrackerTestCase): | |||
| 30 | files = restarted.scrape(info_hash)[b"files"] | 30 | files = restarted.scrape(info_hash)[b"files"] |
| 31 | self.assertIn(info_hash, files, "the torrent did not survive the restart") | 31 | self.assertIn(info_hash, files, "the torrent did not survive the restart") |
| 32 | entry = files[info_hash] | 32 | entry = files[info_hash] |
| 33 | self.assertEqual(entry[b"downloaded"], 1, "the completed count did not survive") | ||
| 33 | self.assertEqual(entry[b"complete"], 0, "no peers are carried over, only the torrent") | 34 | self.assertEqual(entry[b"complete"], 0, "no peers are carried over, only the torrent") |
| 34 | self.assertEqual(entry[b"incomplete"], 0) | 35 | self.assertEqual(entry[b"incomplete"], 0) |
| 35 | complaints = restarted.stop() | 36 | complaints = restarted.stop() |
