recalculating only the new hanchans shoud do the trick now.
the racalc cronjob reports erronous partly recalculations now. A lot of code cleanups
This commit is contained in:
@@ -25,7 +25,7 @@ class KyuDanTest(TestCase):
|
||||
'test_kyu_dan_rankings.json'
|
||||
]
|
||||
|
||||
def recalc(self):
|
||||
def _test_recalc(self):
|
||||
"""
|
||||
Test if a Kyu/Dan Ranking recalculation gives the same result as stored.
|
||||
|
||||
@@ -58,10 +58,10 @@ class KyuDanTest(TestCase):
|
||||
user=ranking.user,
|
||||
since=ranking.legacy_date
|
||||
)
|
||||
if not confirmed_hanchans.count():
|
||||
continue
|
||||
rnd = random.randrange(confirmed_hanchans.count())
|
||||
since = confirmed_hanchans[rnd].start
|
||||
print(since)
|
||||
|
||||
ranking.recalculate(hanchan_start=since)
|
||||
for attr in self.equal_attrs:
|
||||
self.assertEqual(
|
||||
|
||||
Reference in New Issue
Block a user