ml-trust-model

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

commit 4ba7b2e1ee3554eee8862f2138496ff5679be5a3
parent 5028bb39a936a09ca14b431f133838d3445c0ed3
Author: Cody Lewis <codymlewis@protonmail.com>
Date:   Tue, 16 Apr 2019 15:01:06 +1000

Updated unit tests

Diffstat:
MTest.py | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Test.py b/Test.py @@ -51,8 +51,8 @@ class TestTrustModel(unittest.TestCase): ''' Test that note taking returns the expected values. ''' - node = Node.Node() - proxy = Node.Node() + node = Node.Node(100, 100) + proxy = Node.Node(100, 100) self.assertEqual(node.take_note(proxy, 50, 50), 1) proxy = Node.Node(100, 1) self.assertEqual(node.take_note(proxy, 50, 50), 0) @@ -88,7 +88,7 @@ class TestTrustModel(unittest.TestCase): Test the report creation of the bad mouther. ''' proxy = Node.Node(100, 100) - bad_mouther = BadMouther.BadMouther() + bad_mouther = BadMouther.BadMouther(1, 1) self.make_report(bad_mouther, proxy, note=-1) proxy = Node.Node(1, 100) self.make_report(bad_mouther, proxy, note=-1) @@ -97,8 +97,8 @@ class TestTrustModel(unittest.TestCase): proxy = Node.Node(1, 1) self.make_report(bad_mouther, proxy, note=-1) - def make_report(self, client, proxy, service=50, - capability=50, note=1, time=0): + def make_report(self, client, proxy, service=1, + capability=1, note=1, time=0): ''' Test that a report matches expected values '''