ml-trust-model

git clone git://git.codymlewis.com/ml-trust-model.git
Log | Files | Refs | README

commit c2eb5846476edbdfad9a974952843d9c90eeb1fa
parent 30ddb13347d2c1cd9ca284328963b981f38e8857
Author: Cody Lewis <codymlewis@protonmail.com>
Date:   Tue, 12 Mar 2019 23:10:23 +1100

Updated test case

Diffstat:
Mtest.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/test.py b/test.py @@ -42,9 +42,12 @@ class TestTrustModel(unittest.TestCase): Test that note taking returns the expected values. ''' node = TrustModel.Node() - self.assertEqual(node.take_note(100, 100, 50, 50), 1) - self.assertEqual(node.take_note(100, 1, 50, 50), 0) - self.assertEqual(node.take_note(1, 1, 50, 50), -1) + proxy = TrustModel.Node() + self.assertEqual(node.take_note(proxy, 50, 50), 1) + proxy = TrustModel.Node(100, 1) + self.assertEqual(node.take_note(proxy, 50, 50), 0) + proxy = TrustModel.Node(1, 1) + self.assertEqual(node.take_note(proxy, 50, 50), -1) if __name__ == '__main__':