예제 #1
0
 def test_repr_method(self):
     Q = ciw.Simulation(
         ciw.create_network_from_yml(
             'ciw/tests/testing_parameters/params.yml'))
     N = Q.transitive_nodes[0]
     s = ciw.Server(N, 4)
     self.assertEqual(str(s), 'Server 4 at Node 1')
예제 #2
0
파일: test_server.py 프로젝트: muxuezi/Ciw
 def test_repr_method(self):
     Q = ciw.Simulation(
         ciw.load_parameters(
             'ciw/tests/datafortesting/logs_test_for_simulation/parameters.yml'
         ))
     N = Q.transitive_nodes[0]
     s = ciw.Server(N, 4)
     self.assertEqual(str(s), 'Server 4 at Node 1')
예제 #3
0
 def test_init_method(self):
     Q = ciw.Simulation(ciw.create_network_from_yml(
         'ciw/tests/testing_parameters/params.yml'))
     N = Q.transitive_nodes[1]
     s = ciw.Server(N, 3)
     self.assertEqual(s.id_number, 3)
     self.assertEqual(s.node, N)
     self.assertEqual(s.node.id_number, 2)
     self.assertEqual(s.cust, False)
     self.assertEqual(s.busy, False)
     self.assertEqual(s.offduty, False)
예제 #4
0
파일: test_server.py 프로젝트: muxuezi/Ciw
 def test_init_method(self):
     Q = ciw.Simulation(
         ciw.load_parameters(
             'ciw/tests/datafortesting/logs_test_for_simulation/parameters.yml'
         ))
     N = Q.transitive_nodes[1]
     s = ciw.Server(N, 3)
     self.assertEqual(s.id_number, 3)
     self.assertEqual(s.node, N)
     self.assertEqual(s.node.id_number, 2)
     self.assertEqual(s.cust, False)
     self.assertEqual(s.busy, False)
     self.assertEqual(s.offduty, False)