Skip to content

Commit

Permalink
تحسين الاختبار
Browse files Browse the repository at this point in the history
  • Loading branch information
vzool committed Nov 18, 2024
1 parent 33884cd commit 723051d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zakat/zakat_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4257,6 +4257,7 @@ def test(self, debug: bool = False) -> bool:
}
for x in table:
for y in table[x]:
ref = None
if y['ops'] == 'track':
ref = self.db.track(
unscaled_value=y['unscaled_value'],
Expand All @@ -4276,14 +4277,14 @@ def test(self, debug: bool = False) -> bool:
)
if debug:
print('_sub', z, Helper.time())
assert ref != None
assert ref is not None
assert len(self.db.vault(Vault.ACCOUNT)[x]['log'][ref]['file']) == 0
for i in range(3):
file_ref = self.db.add_file(x, ref, 'file_' + str(i))
sleep(0.0000001)
if debug:
print('ref', ref, 'file', file_ref)
assert file_ref != None
assert file_ref is not None
assert len(self.db.vault(Vault.ACCOUNT)[x]['log'][ref]['file']) == i + 1
file_ref = self.db.add_file(x, ref, 'file_' + str(3))
assert self.db.remove_file(x, ref, file_ref)
Expand Down

0 comments on commit 723051d

Please sign in to comment.