1
|
|
|
"""Module to test the KytosGraph in graph.py.""" |
2
|
|
|
from itertools import combinations |
3
|
|
|
|
4
|
|
|
# module under test |
5
|
|
|
from tests.integration.edges_settings import EdgesSettings |
6
|
|
|
|
7
|
|
|
|
8
|
|
|
class TestResultsEdges(EdgesSettings): |
9
|
|
|
"""Tests for the graph class. |
10
|
|
|
|
11
|
|
|
Tests to see if reflexive searches and impossible searches |
12
|
|
|
show correct results. |
13
|
|
|
""" |
14
|
|
|
|
15
|
|
|
def test_path1(self): |
16
|
|
|
"""Tests paths between all users using unconstrained path algorithm.""" |
17
|
|
|
combos = combinations(["User1", "User2", "User3", "User4"], 2) |
18
|
|
|
self.initializer() |
19
|
|
|
|
20
|
|
|
valid = True |
21
|
|
|
for point_a, point_b in combos: |
22
|
|
|
results = self.get_path(point_a, point_b) |
23
|
|
|
if not results: |
24
|
|
|
valid = False |
25
|
|
|
break |
26
|
|
|
|
27
|
|
|
self.assertNotEqual(valid, False) |
28
|
|
|
|
29
|
|
|
def test_path12(self): |
30
|
|
|
"""Tests paths between all users using unconstrained path algorithm.""" |
31
|
|
|
combos = combinations(["User1", "User2", "User3", "User4", "User5"], 2) |
32
|
|
|
self.initializer() |
33
|
|
|
|
34
|
|
|
valid = True |
35
|
|
|
for point_a, point_b in combos: |
36
|
|
|
results = self.get_path(point_a, point_b) |
37
|
|
|
if not results: |
38
|
|
|
valid = False |
39
|
|
|
break |
40
|
|
|
|
41
|
|
|
self.assertEqual(valid, False) |
42
|
|
|
|
43
|
|
|
def test_path2(self): |
44
|
|
|
"""Tests paths between all users using constrained path algorithm, |
45
|
|
|
with no constraints set. |
46
|
|
|
""" |
47
|
|
|
combos = combinations(["User1", "User2", "User3", "User4"], 2) |
48
|
|
|
self.initializer() |
49
|
|
|
|
50
|
|
|
for point_a, point_b in combos: |
51
|
|
|
results = self.get_path_constrained(point_a, point_b) |
52
|
|
|
self.assertNotEqual(results, []) |
53
|
|
|
|
54
|
|
|
def test_path3_1(self): |
55
|
|
|
"""Tests paths between all users using constrained path algorithm, |
56
|
|
|
with the ownership constraint set to B. |
57
|
|
|
""" |
58
|
|
|
self.assertTrue(self.paths_between_all_users("S4:1", {'ownership': "B"})) |
59
|
|
|
|
60
|
|
|
def test_path3_2(self): |
61
|
|
|
"""Tests paths between all users using constrained path algorithm, |
62
|
|
|
with the ownership constraint set to B. |
63
|
|
|
""" |
64
|
|
|
self.assertTrue(self.paths_between_all_users("S5:2", {'ownership': "B"})) |
65
|
|
|
|
66
|
|
|
def test_path3_3(self): |
67
|
|
|
"""Tests paths between all users using constrained path algorithm, |
68
|
|
|
with the ownership constraint set to B. |
69
|
|
|
""" |
70
|
|
|
self.assertTrue(self.paths_between_all_users("S4:2", {'ownership': "B"})) |
71
|
|
|
|
72
|
|
|
def test_path3_4(self): |
73
|
|
|
"""Tests paths between all users using constrained path algorithm, |
74
|
|
|
with the ownership constraint set to B. |
75
|
|
|
""" |
76
|
|
|
self.assertTrue(self.paths_between_all_users("User1:2", {'ownership': "B"})) |
77
|
|
|
|
78
|
|
|
def test_path3_5(self): |
79
|
|
|
"""Tests paths between all users using constrained path algorithm, |
80
|
|
|
with the ownership constraint set to B. |
81
|
|
|
""" |
82
|
|
|
self.assertTrue(self.paths_between_all_users("S5:4", {'ownership': "B"})) |
83
|
|
|
|
84
|
|
|
def test_path3_6(self): |
85
|
|
|
"""Tests paths between all users using constrained path algorithm, |
86
|
|
|
with the ownership constraint set to B. |
87
|
|
|
""" |
88
|
|
|
self.assertTrue(self.paths_between_all_users("S6:2", {'ownership': "B"})) |
89
|
|
|
|
90
|
|
|
def test_path3_7(self): |
91
|
|
|
"""Tests paths between all users using constrained path algorithm, |
92
|
|
|
with the ownership constraint set to B. |
93
|
|
|
""" |
94
|
|
|
self.assertTrue(self.paths_between_all_users("S6:5", {'ownership': "B"})) |
95
|
|
|
|
96
|
|
|
def test_path3_8(self): |
97
|
|
|
"""Tests paths between all users using constrained path algorithm, |
98
|
|
|
with the ownership constraint set to B. |
99
|
|
|
""" |
100
|
|
|
self.assertTrue(self.paths_between_all_users("S10:1", {'ownership': "B"})) |
101
|
|
|
|
102
|
|
|
def test_path3_9(self): |
103
|
|
|
"""Tests paths between all users using constrained path algorithm, |
104
|
|
|
with the ownership constraint set to B. |
105
|
|
|
""" |
106
|
|
|
self.assertTrue(self.paths_between_all_users("S8:6", {'ownership': "B"})) |
107
|
|
|
|
108
|
|
|
def test_path3_1_0(self): |
109
|
|
|
"""Tests paths between all users using constrained path algorithm, |
110
|
|
|
with the ownership constraint set to B. |
111
|
|
|
""" |
112
|
|
|
self.assertTrue(self.paths_between_all_users("S10:2", {'ownership': "B"})) |
113
|
|
|
|
114
|
|
|
def test_path3_1_1(self): |
115
|
|
|
"""Tests paths between all users using constrained path algorithm, |
116
|
|
|
with the ownership constraint set to B. |
117
|
|
|
""" |
118
|
|
|
self.assertTrue(self.paths_between_all_users("S10:3", {'ownership': "B"})) |
119
|
|
|
|
120
|
|
|
def test_path3_1_2(self): |
121
|
|
|
"""Tests paths between all users using constrained path algorithm, |
122
|
|
|
with the ownership constraint set to B. |
123
|
|
|
""" |
124
|
|
|
self.assertTrue(self.paths_between_all_users("User2:1", {'ownership': "B"})) |
125
|
|
|
|
126
|
|
|
##### |
127
|
|
|
|
128
|
|
|
def test_path4_1(self): |
129
|
|
|
"""Tests paths between all users using constrained path algorithm, |
130
|
|
|
with the reliability constraint set to 3. |
131
|
|
|
""" |
132
|
|
|
self.assertTrue(self.paths_between_all_users("S4:1", {'reliability': 3})) |
133
|
|
|
|
134
|
|
|
def test_path4_2(self): |
135
|
|
|
"""Tests paths between all users using constrained path algorithm, |
136
|
|
|
with the reliability constraint set to 3. |
137
|
|
|
""" |
138
|
|
|
self.assertTrue(self.paths_between_all_users("S5:2", {'reliability': 3})) |
139
|
|
|
|
140
|
|
|
def test_path4_3(self): |
141
|
|
|
"""Tests paths between all users using constrained path algorithm, |
142
|
|
|
with the reliability constraint set to 3. |
143
|
|
|
""" |
144
|
|
|
self.assertTrue(self.paths_between_all_users("S5:3", {'reliability': 3})) |
145
|
|
|
|
146
|
|
|
def test_path4_4(self): |
147
|
|
|
"""Tests paths between all users using constrained path algorithm, |
148
|
|
|
with the reliability constraint set to 3. |
149
|
|
|
""" |
150
|
|
|
self.assertTrue(self.paths_between_all_users("S6:1", {'reliability': 3})) |
151
|
|
|
|
152
|
|
|
def test_path5_1(self): |
153
|
|
|
"""Tests paths between all users using constrained path algorithm, |
154
|
|
|
with the reliability constraint set to 3. |
155
|
|
|
""" |
156
|
|
|
self.assertTrue(self.paths_between_all_users("S3:1", {'bandwidth': 100})) |
157
|
|
|
|
158
|
|
|
def test_path5_2(self): |
159
|
|
|
"""Tests paths between all users using constrained path algorithm, |
160
|
|
|
with the reliability constraint set to 3. |
161
|
|
|
""" |
162
|
|
|
self.assertTrue(self.paths_between_all_users("S5:1", {'bandwidth': 100})) |
163
|
|
|
|
164
|
|
|
def test_path5_3(self): |
165
|
|
|
"""Tests paths between all users using constrained path algorithm, |
166
|
|
|
with the reliability constraint set to 3. |
167
|
|
|
""" |
168
|
|
|
self.assertTrue(self.paths_between_all_users("User1:4", {'bandwidth': 100})) |
169
|
|
|
|
170
|
|
|
def test_path5_4(self): |
171
|
|
|
"""Tests paths between all users using constrained path algorithm, |
172
|
|
|
with the reliability constraint set to 3. |
173
|
|
|
""" |
174
|
|
|
self.assertTrue(self.paths_between_all_users("User4:3", {'bandwidth': 100})) |
175
|
|
|
|
176
|
|
|
#### |
177
|
|
|
|
178
|
|
|
def test_path6_1(self): |
179
|
|
|
"""Tests paths between all users using constrained path algorithm, |
180
|
|
|
with the delay constraint set to 50. |
181
|
|
|
""" |
182
|
|
|
self.assertTrue(self.paths_between_all_users("S1:1", {'delay': 50})) |
183
|
|
|
|
184
|
|
|
def test_path6_2(self): |
185
|
|
|
"""Tests paths between all users using constrained path algorithm, |
186
|
|
|
with the delay constraint set to 50. |
187
|
|
|
""" |
188
|
|
|
self.assertTrue(self.paths_between_all_users("S2:1", {'delay': 50})) |
189
|
|
|
|
190
|
|
|
def test_path6_3(self): |
191
|
|
|
"""Tests paths between all users using constrained path algorithm, |
192
|
|
|
with the delay constraint set to 50. |
193
|
|
|
""" |
194
|
|
|
self.assertTrue(self.paths_between_all_users("S3:1", {'delay': 50})) |
195
|
|
|
|
196
|
|
|
def test_path6_4(self): |
197
|
|
|
"""Tests paths between all users using constrained path algorithm, |
198
|
|
|
with the delay constraint set to 50. |
199
|
|
|
""" |
200
|
|
|
self.assertTrue(self.paths_between_all_users("S5:1", {'delay': 50})) |
201
|
|
|
|
202
|
|
|
def test_path6_5(self): |
203
|
|
|
"""Tests paths between all users using constrained path algorithm, |
204
|
|
|
with the delay constraint set to 50. |
205
|
|
|
""" |
206
|
|
|
self.assertTrue(self.paths_between_all_users("S4:2", {'delay': 50})) |
207
|
|
|
|
208
|
|
|
def test_path6_6(self): |
209
|
|
|
"""Tests paths between all users using constrained path algorithm, |
210
|
|
|
with the delay constraint set to 50. |
211
|
|
|
""" |
212
|
|
|
self.assertTrue(self.paths_between_all_users("User1:2", {'delay': 50})) |
213
|
|
|
|
214
|
|
|
def test_path6_7(self): |
215
|
|
|
"""Tests paths between all users using constrained path algorithm, |
216
|
|
|
with the delay constraint set to 50. |
217
|
|
|
""" |
218
|
|
|
self.assertTrue(self.paths_between_all_users("S5:5", {'delay': 50})) |
219
|
|
|
|
220
|
|
|
def test_path6_8(self): |
221
|
|
|
"""Tests paths between all users using constrained path algorithm, |
222
|
|
|
with the delay constraint set to 50. |
223
|
|
|
""" |
224
|
|
|
self.assertTrue(self.paths_between_all_users("S8:2", {'delay': 50})) |
225
|
|
|
|
226
|
|
|
def test_path6_9(self): |
227
|
|
|
"""Tests paths between all users using constrained path algorithm, |
228
|
|
|
with the delay constraint set to 50. |
229
|
|
|
""" |
230
|
|
|
self.assertTrue(self.paths_between_all_users("S5:6", {'delay': 50})) |
231
|
|
|
|
232
|
|
|
def test_path6_1_0(self): |
233
|
|
|
"""Tests paths between all users using constrained path algorithm, |
234
|
|
|
with the delay constraint set to 50. |
235
|
|
|
""" |
236
|
|
|
self.assertTrue(self.paths_between_all_users("User1:3", {'delay': 50})) |
237
|
|
|
|
238
|
|
|
def test_path6_1_1(self): |
239
|
|
|
"""Tests paths between all users using constrained path algorithm, |
240
|
|
|
with the delay constraint set to 50. |
241
|
|
|
""" |
242
|
|
|
self.assertTrue(self.paths_between_all_users("S6:3", {'delay': 50})) |
243
|
|
|
|
244
|
|
|
def test_path6_1_2(self): |
245
|
|
|
"""Tests paths between all users using constrained path algorithm, |
246
|
|
|
with the delay constraint set to 50. |
247
|
|
|
""" |
248
|
|
|
self.assertTrue(self.paths_between_all_users("S9:1", {'delay': 50})) |
249
|
|
|
|
250
|
|
|
def test_path6_1_3(self): |
251
|
|
|
"""Tests paths between all users using constrained path algorithm, |
252
|
|
|
with the delay constraint set to 50. |
253
|
|
|
""" |
254
|
|
|
self.assertTrue(self.paths_between_all_users("S6:4", {'delay': 50})) |
255
|
|
|
|
256
|
|
|
def test_path6_1_4(self): |
257
|
|
|
"""Tests paths between all users using constrained path algorithm, |
258
|
|
|
with the delay constraint set to 50. |
259
|
|
|
""" |
260
|
|
|
self.assertTrue(self.paths_between_all_users("S9:2", {'delay': 50})) |
261
|
|
|
|
262
|
|
|
def test_path6_1_5(self): |
263
|
|
|
"""Tests paths between all users using constrained path algorithm, |
264
|
|
|
with the delay constraint set to 50. |
265
|
|
|
""" |
266
|
|
|
self.assertTrue(self.paths_between_all_users("S6:5", {'delay': 50})) |
267
|
|
|
|
268
|
|
|
def test_path6_1_6(self): |
269
|
|
|
"""Tests paths between all users using constrained path algorithm, |
270
|
|
|
with the delay constraint set to 50. |
271
|
|
|
""" |
272
|
|
|
self.assertTrue(self.paths_between_all_users("S6:5", {'delay': 50})) |
273
|
|
|
|
274
|
|
|
def test_path6_1_7(self): |
275
|
|
|
"""Tests paths between all users using constrained path algorithm, |
276
|
|
|
with the delay constraint set to 50. |
277
|
|
|
""" |
278
|
|
|
self.assertTrue(self.paths_between_all_users("S10:1", {'delay': 50})) |
279
|
|
|
|
280
|
|
|
def test_path6_1_8(self): |
281
|
|
|
"""Tests paths between all users using constrained path algorithm, |
282
|
|
|
with the delay constraint set to 50. |
283
|
|
|
""" |
284
|
|
|
self.assertTrue(self.paths_between_all_users("S8:5", {'delay': 50})) |
285
|
|
|
|
286
|
|
|
def test_path6_1_9(self): |
287
|
|
|
"""Tests paths between all users using constrained path algorithm, |
288
|
|
|
with the delay constraint set to 50. |
289
|
|
|
""" |
290
|
|
|
self.assertTrue(self.paths_between_all_users("S9:4", {'delay': 50})) |
291
|
|
|
|
292
|
|
|
def test_path6_2_0(self): |
293
|
|
|
"""Tests paths between all users using constrained path algorithm, |
294
|
|
|
with the delay constraint set to 50. |
295
|
|
|
""" |
296
|
|
|
self.assertTrue(self.paths_between_all_users("User1:4", {'delay': 50})) |
297
|
|
|
|
298
|
|
|
def test_path6_2_1(self): |
299
|
|
|
"""Tests paths between all users using constrained path algorithm, |
300
|
|
|
with the delay constraint set to 50. |
301
|
|
|
""" |
302
|
|
|
self.assertTrue(self.paths_between_all_users("User4:3", {'delay': 50})) |
303
|
|
|
|
304
|
|
|
#### |
305
|
|
|
|
306
|
|
|
def test_path7_1(self): |
307
|
|
|
"""Tests paths between all users using constrained path algorithm, |
308
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
309
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
310
|
|
|
constraint set to 'B' |
311
|
|
|
""" |
312
|
|
|
# delay = 50 |
313
|
|
|
self.assertTrue(self.paths_between_all_users("S1:1", {'delay': 50, |
314
|
|
|
'bandwidth': 100, |
315
|
|
|
'ownership': "B"})) |
316
|
|
|
|
317
|
|
|
def test_path7_2(self): |
318
|
|
|
"""Tests paths between all users using constrained path algorithm, |
319
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
320
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
321
|
|
|
constraint set to 'B' |
322
|
|
|
""" |
323
|
|
|
# delay = 50 |
324
|
|
|
self.assertTrue(self.paths_between_all_users("S2:1", {'delay': 50, |
325
|
|
|
'bandwidth': 100, |
326
|
|
|
'ownership': "B"})) |
327
|
|
|
|
328
|
|
|
def test_path7_3(self): |
329
|
|
|
"""Tests paths between all users using constrained path algorithm, |
330
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
331
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
332
|
|
|
constraint set to 'B' |
333
|
|
|
""" |
334
|
|
|
# delay = 50 |
335
|
|
|
self.assertTrue(self.paths_between_all_users("S3:1", {'delay': 50, |
336
|
|
|
'bandwidth': 100, |
337
|
|
|
'ownership': "B"})) |
338
|
|
|
|
339
|
|
|
def test_path7_4(self): |
340
|
|
|
"""Tests paths between all users using constrained path algorithm, |
341
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
342
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
343
|
|
|
constraint set to 'B' |
344
|
|
|
""" |
345
|
|
|
# delay = 50 |
346
|
|
|
self.assertTrue(self.paths_between_all_users("S5:1", {'delay': 50, |
347
|
|
|
'bandwidth': 100, |
348
|
|
|
'ownership': "B"})) |
349
|
|
|
|
350
|
|
|
def test_path7_5(self): |
351
|
|
|
"""Tests paths between all users using constrained path algorithm, |
352
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
353
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
354
|
|
|
constraint set to 'B' |
355
|
|
|
""" |
356
|
|
|
# delay = 50 |
357
|
|
|
self.assertTrue(self.paths_between_all_users("S4:2", {'delay': 50, |
358
|
|
|
'bandwidth': 100, |
359
|
|
|
'ownership': "B"})) |
360
|
|
|
|
361
|
|
|
def test_path7_6(self): |
362
|
|
|
"""Tests paths between all users using constrained path algorithm, |
363
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
364
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
365
|
|
|
constraint set to 'B' |
366
|
|
|
""" |
367
|
|
|
# delay = 50 |
368
|
|
|
self.assertTrue(self.paths_between_all_users("User1:2", {'delay': 50, |
369
|
|
|
'bandwidth': 100, |
370
|
|
|
'ownership': "B"})) |
371
|
|
|
|
372
|
|
|
def test_path7_7(self): |
373
|
|
|
"""Tests paths between all users using constrained path algorithm, |
374
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
375
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
376
|
|
|
constraint set to 'B' |
377
|
|
|
""" |
378
|
|
|
# delay = 50 |
379
|
|
|
self.assertTrue(self.paths_between_all_users("S5:5", {'delay': 50, |
380
|
|
|
'bandwidth': 100, |
381
|
|
|
'ownership': "B"})) |
382
|
|
|
|
383
|
|
|
def test_path7_8(self): |
384
|
|
|
"""Tests paths between all users using constrained path algorithm, |
385
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
386
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
387
|
|
|
constraint set to 'B' |
388
|
|
|
""" |
389
|
|
|
# delay = 50 |
390
|
|
|
self.assertTrue(self.paths_between_all_users("S8:2", {'delay': 50, |
391
|
|
|
'bandwidth': 100, |
392
|
|
|
'ownership': "B"})) |
393
|
|
|
|
394
|
|
|
def test_path7_9(self): |
395
|
|
|
"""Tests paths between all users using constrained path algorithm, |
396
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
397
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
398
|
|
|
constraint set to 'B' |
399
|
|
|
""" |
400
|
|
|
# delay = 50 |
401
|
|
|
self.assertTrue(self.paths_between_all_users("S5:6", {'delay': 50, |
402
|
|
|
'bandwidth': 100, |
403
|
|
|
'ownership': "B"})) |
404
|
|
|
|
405
|
|
|
def test_path7_1_0(self): |
406
|
|
|
"""Tests paths between all users using constrained path algorithm, |
407
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
408
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
409
|
|
|
constraint set to 'B' |
410
|
|
|
""" |
411
|
|
|
# delay = 50 |
412
|
|
|
self.assertTrue(self.paths_between_all_users("User1:3", {'delay': 50, |
413
|
|
|
'bandwidth': 100, |
414
|
|
|
'ownership': "B"})) |
415
|
|
|
|
416
|
|
|
def test_path7_1_1(self): |
417
|
|
|
"""Tests paths between all users using constrained path algorithm, |
418
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
419
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
420
|
|
|
constraint set to 'B' |
421
|
|
|
""" |
422
|
|
|
# delay = 50 |
423
|
|
|
self.assertTrue(self.paths_between_all_users("S6:3", {'delay': 50, |
424
|
|
|
'bandwidth': 100, |
425
|
|
|
'ownership': "B"})) |
426
|
|
|
|
427
|
|
|
def test_path7_1_2(self): |
428
|
|
|
"""Tests paths between all users using constrained path algorithm, |
429
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
430
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
431
|
|
|
constraint set to 'B' |
432
|
|
|
""" |
433
|
|
|
# delay = 50 |
434
|
|
|
self.assertTrue(self.paths_between_all_users("S9:1", {'delay': 50, |
435
|
|
|
'bandwidth': 100, |
436
|
|
|
'ownership': "B"})) |
437
|
|
|
|
438
|
|
|
def test_path7_1_3(self): |
439
|
|
|
"""Tests paths between all users using constrained path algorithm, |
440
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
441
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
442
|
|
|
constraint set to 'B' |
443
|
|
|
""" |
444
|
|
|
# delay = 50 |
445
|
|
|
self.assertTrue(self.paths_between_all_users("S6:4", {'delay': 50, |
446
|
|
|
'bandwidth': 100, |
447
|
|
|
'ownership': "B"})) |
448
|
|
|
|
449
|
|
|
def test_path7_1_4(self): |
450
|
|
|
"""Tests paths between all users using constrained path algorithm, |
451
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
452
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
453
|
|
|
constraint set to 'B' |
454
|
|
|
""" |
455
|
|
|
# delay = 50 |
456
|
|
|
self.assertTrue(self.paths_between_all_users("S9:2", {'delay': 50, |
457
|
|
|
'bandwidth': 100, |
458
|
|
|
'ownership': "B"})) |
459
|
|
|
|
460
|
|
|
def test_path7_1_5(self): |
461
|
|
|
"""Tests paths between all users using constrained path algorithm, |
462
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
463
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
464
|
|
|
constraint set to 'B' |
465
|
|
|
""" |
466
|
|
|
# delay = 50 |
467
|
|
|
self.assertTrue(self.paths_between_all_users("S6:5", {'delay': 50, |
468
|
|
|
'bandwidth': 100, |
469
|
|
|
'ownership': "B"})) |
470
|
|
|
|
471
|
|
|
def test_path7_1_6(self): |
472
|
|
|
"""Tests paths between all users using constrained path algorithm, |
473
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
474
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
475
|
|
|
constraint set to 'B' |
476
|
|
|
""" |
477
|
|
|
# delay = 50 |
478
|
|
|
self.assertTrue(self.paths_between_all_users("S10:1", {'delay': 50, |
479
|
|
|
'bandwidth': 100, |
480
|
|
|
'ownership': "B"})) |
481
|
|
|
|
482
|
|
|
def test_path7_1_7(self): |
483
|
|
|
"""Tests paths between all users using constrained path algorithm, |
484
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
485
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
486
|
|
|
constraint set to 'B' |
487
|
|
|
""" |
488
|
|
|
# delay = 50 |
489
|
|
|
self.assertTrue(self.paths_between_all_users("S8:5", {'delay': 50, |
490
|
|
|
'bandwidth': 100, |
491
|
|
|
'ownership': "B"})) |
492
|
|
|
|
493
|
|
|
def test_path7_1_8(self): |
494
|
|
|
"""Tests paths between all users using constrained path algorithm, |
495
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
496
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
497
|
|
|
constraint set to 'B' |
498
|
|
|
""" |
499
|
|
|
# delay = 50 |
500
|
|
|
self.assertTrue(self.paths_between_all_users("S9:4", {'delay': 50, |
501
|
|
|
'bandwidth': 100, |
502
|
|
|
'ownership': "B"})) |
503
|
|
|
|
504
|
|
|
def test_path7_1_9(self): |
505
|
|
|
"""Tests paths between all users using constrained path algorithm, |
506
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
507
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
508
|
|
|
constraint set to 'B' |
509
|
|
|
""" |
510
|
|
|
# delay = 50 |
511
|
|
|
self.assertTrue(self.paths_between_all_users("User1:4", {'delay': 50, |
512
|
|
|
'bandwidth': 100, |
513
|
|
|
'ownership': "B"})) |
514
|
|
|
|
515
|
|
|
def test_path7_2_0(self): |
516
|
|
|
"""Tests paths between all users using constrained path algorithm, |
517
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
518
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
519
|
|
|
constraint set to 'B' |
520
|
|
|
""" |
521
|
|
|
# delay = 50 |
522
|
|
|
self.assertTrue(self.paths_between_all_users("User4:3", {'delay': 50, |
523
|
|
|
'bandwidth': 100, |
524
|
|
|
'ownership': "B"})) |
525
|
|
|
|
526
|
|
|
def test_path7_2_1(self): |
527
|
|
|
"""Tests paths between all users using constrained path algorithm, |
528
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
529
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
530
|
|
|
constraint set to 'B' |
531
|
|
|
""" |
532
|
|
|
# bandwidth = 100 |
533
|
|
|
self.assertTrue(self.paths_between_all_users("S3:1", {'delay': 50, |
534
|
|
|
'bandwidth': 100, |
535
|
|
|
'ownership': "B"})) |
536
|
|
|
|
537
|
|
|
def test_path7_2_2(self): |
538
|
|
|
"""Tests paths between all users using constrained path algorithm, |
539
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
540
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
541
|
|
|
constraint set to 'B' |
542
|
|
|
""" |
543
|
|
|
# bandwidth = 100 |
544
|
|
|
self.assertTrue(self.paths_between_all_users("S5:1", {'delay': 50, |
545
|
|
|
'bandwidth': 100, |
546
|
|
|
'ownership': "B"})) |
547
|
|
|
|
548
|
|
|
def test_path7_2_3(self): |
549
|
|
|
"""Tests paths between all users using constrained path algorithm, |
550
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
551
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
552
|
|
|
constraint set to 'B' |
553
|
|
|
""" |
554
|
|
|
# bandwidth = 100 |
555
|
|
|
self.assertTrue(self.paths_between_all_users("User1:4", {'delay': 50, |
556
|
|
|
'bandwidth': 100, |
557
|
|
|
'ownership': "B"})) |
558
|
|
|
|
559
|
|
|
def test_path7_2_4(self): |
560
|
|
|
"""Tests paths between all users using constrained path algorithm, |
561
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
562
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
563
|
|
|
constraint set to 'B' |
564
|
|
|
""" |
565
|
|
|
# bandwidth = 100 |
566
|
|
|
self.assertTrue(self.paths_between_all_users("User4:3", {'delay': 50, |
567
|
|
|
'bandwidth': 100, |
568
|
|
|
'ownership': "B"})) |
569
|
|
|
|
570
|
|
|
def test_path7_2_5(self): |
571
|
|
|
"""Tests paths between all users using constrained path algorithm, |
572
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
573
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
574
|
|
|
constraint set to 'B' |
575
|
|
|
""" |
576
|
|
|
# reliability = 3 |
577
|
|
|
self.assertTrue(self.paths_between_all_users("S4:1", {'delay': 50, |
578
|
|
|
'bandwidth': 100, |
579
|
|
|
'ownership': "B"})) |
580
|
|
|
|
581
|
|
|
def test_path7_2_6(self): |
582
|
|
|
"""Tests paths between all users using constrained path algorithm, |
583
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
584
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
585
|
|
|
constraint set to 'B' |
586
|
|
|
""" |
587
|
|
|
# reliability = 3 |
588
|
|
|
self.assertTrue(self.paths_between_all_users("S5:2", {'delay': 50, |
589
|
|
|
'bandwidth': 100, |
590
|
|
|
'ownership': "B"})) |
591
|
|
|
|
592
|
|
|
def test_path7_2_7(self): |
593
|
|
|
"""Tests paths between all users using constrained path algorithm, |
594
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
595
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
596
|
|
|
constraint set to 'B' |
597
|
|
|
""" |
598
|
|
|
# reliability = 3 |
599
|
|
|
self.assertTrue(self.paths_between_all_users("S5:3", {'delay': 50, |
600
|
|
|
'bandwidth': 100, |
601
|
|
|
'ownership': "B"})) |
602
|
|
|
|
603
|
|
|
def test_path7_2_8(self): |
604
|
|
|
"""Tests paths between all users using constrained path algorithm, |
605
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
606
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
607
|
|
|
constraint set to 'B' |
608
|
|
|
""" |
609
|
|
|
# reliability = 3 |
610
|
|
|
self.assertTrue(self.paths_between_all_users("S6:1", {'delay': 50, |
611
|
|
|
'bandwidth': 100, |
612
|
|
|
'ownership': "B"})) |
613
|
|
|
|
614
|
|
|
def test_path7_2_9(self): |
615
|
|
|
"""Tests paths between all users using constrained path algorithm, |
616
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
617
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
618
|
|
|
constraint set to 'B' |
619
|
|
|
""" |
620
|
|
|
# ownership = "B" |
621
|
|
|
self.assertTrue(self.paths_between_all_users("S4:1", {'delay': 50, |
622
|
|
|
'bandwidth': 100, |
623
|
|
|
'ownership': "B"})) |
624
|
|
|
|
625
|
|
|
def test_path7_3_0(self): |
626
|
|
|
"""Tests paths between all users using constrained path algorithm, |
627
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
628
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
629
|
|
|
constraint set to 'B' |
630
|
|
|
""" |
631
|
|
|
# ownership = "B" |
632
|
|
|
self.assertTrue(self.paths_between_all_users("S5:2", {'delay': 50, |
633
|
|
|
'bandwidth': 100, |
634
|
|
|
'ownership': "B"})) |
635
|
|
|
|
636
|
|
|
def test_path7_3_1(self): |
637
|
|
|
"""Tests paths between all users using constrained path algorithm, |
638
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
639
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
640
|
|
|
constraint set to 'B' |
641
|
|
|
""" |
642
|
|
|
# ownership = "B" |
643
|
|
|
self.assertTrue(self.paths_between_all_users("S4:2", {'delay': 50, |
644
|
|
|
'bandwidth': 100, |
645
|
|
|
'ownership': "B"})) |
646
|
|
|
|
647
|
|
|
def test_path7_3_2(self): |
648
|
|
|
"""Tests paths between all users using constrained path algorithm, |
649
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
650
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
651
|
|
|
constraint set to 'B' |
652
|
|
|
""" |
653
|
|
|
# ownership = "B" |
654
|
|
|
self.assertTrue(self.paths_between_all_users("User1:2", {'delay': 50, |
655
|
|
|
'bandwidth': 100, |
656
|
|
|
'ownership': "B"})) |
657
|
|
|
|
658
|
|
|
def test_path7_3_3(self): |
659
|
|
|
"""Tests paths between all users using constrained path algorithm, |
660
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
661
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
662
|
|
|
constraint set to 'B' |
663
|
|
|
""" |
664
|
|
|
# ownership = "B" |
665
|
|
|
self.assertTrue(self.paths_between_all_users("S5:4", {'delay': 50, |
666
|
|
|
'bandwidth': 100, |
667
|
|
|
'ownership': "B"})) |
668
|
|
|
|
669
|
|
|
def test_path7_3_4(self): |
670
|
|
|
"""Tests paths between all users using constrained path algorithm, |
671
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
672
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
673
|
|
|
constraint set to 'B' |
674
|
|
|
""" |
675
|
|
|
# ownership = "B" |
676
|
|
|
self.assertTrue(self.paths_between_all_users("S6:2", {'delay': 50, |
677
|
|
|
'bandwidth': 100, |
678
|
|
|
'ownership': "B"})) |
679
|
|
|
|
680
|
|
|
def test_path7_3_5(self): |
681
|
|
|
"""Tests paths between all users using constrained path algorithm, |
682
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
683
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
684
|
|
|
constraint set to 'B' |
685
|
|
|
""" |
686
|
|
|
# ownership = "B" |
687
|
|
|
self.assertTrue(self.paths_between_all_users("S6:5", {'delay': 50, |
688
|
|
|
'bandwidth': 100, |
689
|
|
|
'ownership': "B"})) |
690
|
|
|
|
691
|
|
|
def test_path7_3_6(self): |
692
|
|
|
"""Tests paths between all users using constrained path algorithm, |
693
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
694
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
695
|
|
|
constraint set to 'B' |
696
|
|
|
""" |
697
|
|
|
# ownership = "B" |
698
|
|
|
self.assertTrue(self.paths_between_all_users("S10:1", {'delay': 50, |
699
|
|
|
'bandwidth': 100, |
700
|
|
|
'ownership': "B"})) |
701
|
|
|
|
702
|
|
|
def test_path7_3_7(self): |
703
|
|
|
"""Tests paths between all users using constrained path algorithm, |
704
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
705
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
706
|
|
|
constraint set to 'B' |
707
|
|
|
""" |
708
|
|
|
# ownership = "B" |
709
|
|
|
self.assertTrue(self.paths_between_all_users("S8:6", {'delay': 50, |
710
|
|
|
'bandwidth': 100, |
711
|
|
|
'ownership': "B"})) |
712
|
|
|
|
713
|
|
|
def test_path7_3_8(self): |
714
|
|
|
"""Tests paths between all users using constrained path algorithm, |
715
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
716
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
717
|
|
|
constraint set to 'B' |
718
|
|
|
""" |
719
|
|
|
# ownership = "B" |
720
|
|
|
self.assertTrue(self.paths_between_all_users("S10:2", {'delay': 50, |
721
|
|
|
'bandwidth': 100, |
722
|
|
|
'ownership': "B"})) |
723
|
|
|
|
724
|
|
|
def test_path7_3_9(self): |
725
|
|
|
"""Tests paths between all users using constrained path algorithm, |
726
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
727
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
728
|
|
|
constraint set to 'B' |
729
|
|
|
""" |
730
|
|
|
# ownership = "B" |
731
|
|
|
self.assertTrue(self.paths_between_all_users("S10:3", {'delay': 50, |
732
|
|
|
'bandwidth': 100, |
733
|
|
|
'ownership': "B"})) |
734
|
|
|
|
735
|
|
|
def test_path7_4_0(self): |
736
|
|
|
"""Tests paths between all users using constrained path algorithm, |
737
|
|
|
with the delay constraint set to 50, the bandwidth constraint set |
738
|
|
|
to 100, the reliability constraint set to 3, and the ownership |
739
|
|
|
constraint set to 'B' |
740
|
|
|
""" |
741
|
|
|
# ownership = "B" |
742
|
|
|
self.assertTrue(self.paths_between_all_users("User2:1", {'delay': 50, |
743
|
|
|
'bandwidth': 100, |
744
|
|
|
'ownership': "B"})) |
745
|
|
|
|
746
|
|
|
##### |
747
|
|
|
|
748
|
|
|
def test_path8_1(self): |
749
|
|
|
"""Tests paths between all users using constrained path algorithm, |
750
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
751
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
752
|
|
|
constraint set to 'B' |
753
|
|
|
|
754
|
|
|
Tests conducted with flexibility enabled |
755
|
|
|
""" |
756
|
|
|
# delay = 50 |
757
|
|
|
self.assertTrue(self.paths_between_all_users("S1:1", flexible={'delay': 50, |
758
|
|
|
'bandwidth': 100, |
759
|
|
|
'reliability': 3, |
760
|
|
|
'ownership': "B"}, |
761
|
|
|
metrics='delay')) |
762
|
|
|
|
763
|
|
|
def test_path8_2(self): |
764
|
|
|
"""Tests paths between all users using constrained path algorithm, |
765
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
766
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
767
|
|
|
constraint set to 'B' |
768
|
|
|
|
769
|
|
|
Tests conducted with flexibility enabled |
770
|
|
|
""" |
771
|
|
|
# delay = 50 |
772
|
|
|
self.assertTrue(self.paths_between_all_users("S2:1", flexible={'delay': 50, |
773
|
|
|
'bandwidth': 100, |
774
|
|
|
'reliability': 3, |
775
|
|
|
'ownership': "B"}, |
776
|
|
|
metrics='delay')) |
777
|
|
|
|
778
|
|
|
def test_path8_3(self): |
779
|
|
|
"""Tests paths between all users using constrained path algorithm, |
780
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
781
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
782
|
|
|
constraint set to 'B' |
783
|
|
|
|
784
|
|
|
Tests conducted with flexibility enabled |
785
|
|
|
""" |
786
|
|
|
# delay = 50 |
787
|
|
|
self.assertTrue(self.paths_between_all_users("S3:1", flexible={'delay': 50, |
788
|
|
|
'bandwidth': 100, |
789
|
|
|
'reliability': 3, |
790
|
|
|
'ownership': "B"}, |
791
|
|
|
metrics='delay')) |
792
|
|
|
|
793
|
|
|
def test_path8_4(self): |
794
|
|
|
"""Tests paths between all users using constrained path algorithm, |
795
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
796
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
797
|
|
|
constraint set to 'B' |
798
|
|
|
|
799
|
|
|
Tests conducted with flexibility enabled |
800
|
|
|
""" |
801
|
|
|
# delay = 50 |
802
|
|
|
self.assertTrue(self.paths_between_all_users("S5:1", flexible={'delay': 50, |
803
|
|
|
'bandwidth': 100, |
804
|
|
|
'reliability': 3, |
805
|
|
|
'ownership': "B"}, |
806
|
|
|
metrics='delay')) |
807
|
|
|
|
808
|
|
|
def test_path8_5(self): |
809
|
|
|
"""Tests paths between all users using constrained path algorithm, |
810
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
811
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
812
|
|
|
constraint set to 'B' |
813
|
|
|
|
814
|
|
|
Tests conducted with flexibility enabled |
815
|
|
|
""" |
816
|
|
|
# delay = 50 |
817
|
|
|
self.assertTrue(self.paths_between_all_users("S4:2", flexible={'delay': 50, |
818
|
|
|
'bandwidth': 100, |
819
|
|
|
'reliability': 3, |
820
|
|
|
'ownership': "B"}, |
821
|
|
|
metrics='delay')) |
822
|
|
|
|
823
|
|
|
def test_path8_6(self): |
824
|
|
|
"""Tests paths between all users using constrained path algorithm, |
825
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
826
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
827
|
|
|
constraint set to 'B' |
828
|
|
|
|
829
|
|
|
Tests conducted with flexibility enabled |
830
|
|
|
""" |
831
|
|
|
# delay = 50 |
832
|
|
|
self.assertTrue(self.paths_between_all_users("User1:2", flexible={'delay': 50, |
833
|
|
|
'bandwidth': 100, |
834
|
|
|
'reliability': 3, |
835
|
|
|
'ownership': "B"}, |
836
|
|
|
metrics='delay')) |
837
|
|
|
|
838
|
|
|
def test_path8_7(self): |
839
|
|
|
"""Tests paths between all users using constrained path algorithm, |
840
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
841
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
842
|
|
|
constraint set to 'B' |
843
|
|
|
|
844
|
|
|
Tests conducted with flexibility enabled |
845
|
|
|
""" |
846
|
|
|
# delay = 50 |
847
|
|
|
self.assertTrue(self.paths_between_all_users("S5:5", flexible={'delay': 50, |
848
|
|
|
'bandwidth': 100, |
849
|
|
|
'reliability': 3, |
850
|
|
|
'ownership': "B"}, |
851
|
|
|
metrics='delay')) |
852
|
|
|
|
853
|
|
|
def test_path8_8(self): |
854
|
|
|
"""Tests paths between all users using constrained path algorithm, |
855
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
856
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
857
|
|
|
constraint set to 'B' |
858
|
|
|
|
859
|
|
|
Tests conducted with flexibility enabled |
860
|
|
|
""" |
861
|
|
|
# delay = 50 |
862
|
|
|
self.assertTrue(self.paths_between_all_users("S8:2", flexible={'delay': 50, |
863
|
|
|
'bandwidth': 100, |
864
|
|
|
'reliability': 3, |
865
|
|
|
'ownership': "B"}, |
866
|
|
|
metrics='delay')) |
867
|
|
|
|
868
|
|
|
def test_path8_9(self): |
869
|
|
|
"""Tests paths between all users using constrained path algorithm, |
870
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
871
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
872
|
|
|
constraint set to 'B' |
873
|
|
|
|
874
|
|
|
Tests conducted with flexibility enabled |
875
|
|
|
""" |
876
|
|
|
# delay = 50 |
877
|
|
|
self.assertTrue(self.paths_between_all_users("S5:6", flexible={'delay': 50, |
878
|
|
|
'bandwidth': 100, |
879
|
|
|
'reliability': 3, |
880
|
|
|
'ownership': "B"}, |
881
|
|
|
metrics='delay')) |
882
|
|
|
|
883
|
|
|
def test_path8_1_0(self): |
884
|
|
|
"""Tests paths between all users using constrained path algorithm, |
885
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
886
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
887
|
|
|
constraint set to 'B' |
888
|
|
|
|
889
|
|
|
Tests conducted with flexibility enabled |
890
|
|
|
""" |
891
|
|
|
# delay = 50 |
892
|
|
|
self.assertTrue(self.paths_between_all_users("User1:3", flexible={'delay': 50, |
893
|
|
|
'bandwidth': 100, |
894
|
|
|
'reliability': 3, |
895
|
|
|
'ownership': "B"}, |
896
|
|
|
metrics='delay')) |
897
|
|
|
|
898
|
|
|
def test_path8_1_1(self): |
899
|
|
|
"""Tests paths between all users using constrained path algorithm, |
900
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
901
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
902
|
|
|
constraint set to 'B' |
903
|
|
|
|
904
|
|
|
Tests conducted with flexibility enabled |
905
|
|
|
""" |
906
|
|
|
# delay = 50 |
907
|
|
|
self.assertTrue(self.paths_between_all_users("S6:3", flexible={'delay': 50, |
908
|
|
|
'bandwidth': 100, |
909
|
|
|
'reliability': 3, |
910
|
|
|
'ownership': "B"}, |
911
|
|
|
metrics='delay')) |
912
|
|
|
|
913
|
|
|
def test_path8_1_2(self): |
914
|
|
|
"""Tests paths between all users using constrained path algorithm, |
915
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
916
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
917
|
|
|
constraint set to 'B' |
918
|
|
|
|
919
|
|
|
Tests conducted with flexibility enabled |
920
|
|
|
""" |
921
|
|
|
# delay = 50 |
922
|
|
|
self.assertTrue(self.paths_between_all_users("S9:1", flexible={'delay': 50, |
923
|
|
|
'bandwidth': 100, |
924
|
|
|
'reliability': 3, |
925
|
|
|
'ownership': "B"}, |
926
|
|
|
metrics='delay')) |
927
|
|
|
|
928
|
|
|
def test_path8_1_3(self): |
929
|
|
|
"""Tests paths between all users using constrained path algorithm, |
930
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
931
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
932
|
|
|
constraint set to 'B' |
933
|
|
|
|
934
|
|
|
Tests conducted with flexibility enabled |
935
|
|
|
""" |
936
|
|
|
# delay = 50 |
937
|
|
|
self.assertTrue(self.paths_between_all_users("S6:4", flexible={'delay': 50, |
938
|
|
|
'bandwidth': 100, |
939
|
|
|
'reliability': 3, |
940
|
|
|
'ownership': "B"}, |
941
|
|
|
metrics='delay')) |
942
|
|
|
|
943
|
|
|
def test_path8_1_4(self): |
944
|
|
|
"""Tests paths between all users using constrained path algorithm, |
945
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
946
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
947
|
|
|
constraint set to 'B' |
948
|
|
|
|
949
|
|
|
Tests conducted with flexibility enabled |
950
|
|
|
""" |
951
|
|
|
# delay = 50 |
952
|
|
|
self.assertTrue(self.paths_between_all_users("S9:2", flexible={'delay': 50, |
953
|
|
|
'bandwidth': 100, |
954
|
|
|
'reliability': 3, |
955
|
|
|
'ownership': "B"}, |
956
|
|
|
metrics='delay')) |
957
|
|
|
|
958
|
|
|
def test_path8_1_5(self): |
959
|
|
|
"""Tests paths between all users using constrained path algorithm, |
960
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
961
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
962
|
|
|
constraint set to 'B' |
963
|
|
|
|
964
|
|
|
Tests conducted with flexibility enabled |
965
|
|
|
""" |
966
|
|
|
# delay = 50 |
967
|
|
|
self.assertTrue(self.paths_between_all_users("S6:5", flexible={'delay': 50, |
968
|
|
|
'bandwidth': 100, |
969
|
|
|
'reliability': 3, |
970
|
|
|
'ownership': "B"}, |
971
|
|
|
metrics='delay')) |
972
|
|
|
|
973
|
|
|
def test_path8_1_6(self): |
974
|
|
|
"""Tests paths between all users using constrained path algorithm, |
975
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
976
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
977
|
|
|
constraint set to 'B' |
978
|
|
|
|
979
|
|
|
Tests conducted with flexibility enabled |
980
|
|
|
""" |
981
|
|
|
# delay = 50 |
982
|
|
|
self.assertTrue(self.paths_between_all_users("S10:1", flexible={'delay': 50, |
983
|
|
|
'bandwidth': 100, |
984
|
|
|
'reliability': 3, |
985
|
|
|
'ownership': "B"}, |
986
|
|
|
metrics='delay')) |
987
|
|
|
|
988
|
|
|
def test_path8_1_7(self): |
989
|
|
|
"""Tests paths between all users using constrained path algorithm, |
990
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
991
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
992
|
|
|
constraint set to 'B' |
993
|
|
|
|
994
|
|
|
Tests conducted with flexibility enabled |
995
|
|
|
""" |
996
|
|
|
# delay = 50 |
997
|
|
|
self.assertTrue(self.paths_between_all_users("S8:5", flexible={'delay': 50, |
998
|
|
|
'bandwidth': 100, |
999
|
|
|
'reliability': 3, |
1000
|
|
|
'ownership': "B"}, |
1001
|
|
|
metrics='delay')) |
1002
|
|
|
|
1003
|
|
|
def test_path8_1_8(self): |
1004
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1005
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1006
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1007
|
|
|
constraint set to 'B' |
1008
|
|
|
|
1009
|
|
|
Tests conducted with flexibility enabled |
1010
|
|
|
""" |
1011
|
|
|
# delay = 50 |
1012
|
|
|
self.assertTrue(self.paths_between_all_users("S9:4", flexible={'delay': 50, |
1013
|
|
|
'bandwidth': 100, |
1014
|
|
|
'reliability': 3, |
1015
|
|
|
'ownership': "B"}, |
1016
|
|
|
metrics='delay')) |
1017
|
|
|
|
1018
|
|
|
def test_path8_1_9(self): |
1019
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1020
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1021
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1022
|
|
|
constraint set to 'B' |
1023
|
|
|
|
1024
|
|
|
Tests conducted with flexibility enabled |
1025
|
|
|
""" |
1026
|
|
|
# delay = 50 |
1027
|
|
|
self.assertTrue(self.paths_between_all_users("User1:4", flexible={'delay': 50, |
1028
|
|
|
'bandwidth': 100, |
1029
|
|
|
'reliability': 3, |
1030
|
|
|
'ownership': "B"}, |
1031
|
|
|
metrics='delay')) |
1032
|
|
|
|
1033
|
|
|
def test_path8_2_0(self): |
1034
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1035
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1036
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1037
|
|
|
constraint set to 'B' |
1038
|
|
|
|
1039
|
|
|
Tests conducted with flexibility enabled |
1040
|
|
|
""" |
1041
|
|
|
# delay = 50 |
1042
|
|
|
self.assertTrue(self.paths_between_all_users("User4:3", flexible={'delay': 50, |
1043
|
|
|
'bandwidth': 100, |
1044
|
|
|
'reliability': 3, |
1045
|
|
|
'ownership': "B"}, |
1046
|
|
|
metrics='delay')) |
1047
|
|
|
|
1048
|
|
|
def test_path8_2_1(self): |
1049
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1050
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1051
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1052
|
|
|
constraint set to 'B' |
1053
|
|
|
|
1054
|
|
|
Tests conducted with flexibility enabled |
1055
|
|
|
""" |
1056
|
|
|
# bandwidth = 100 |
1057
|
|
|
self.assertTrue(self.paths_between_all_users("S3:1", flexible={'delay': 50, |
1058
|
|
|
'bandwidth': 100, |
1059
|
|
|
'reliability': 3, |
1060
|
|
|
'ownership': "B"}, |
1061
|
|
|
metrics='bandwidth')) |
1062
|
|
|
|
1063
|
|
|
def test_path8_2_2(self): |
1064
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1065
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1066
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1067
|
|
|
constraint set to 'B' |
1068
|
|
|
|
1069
|
|
|
Tests conducted with flexibility enabled |
1070
|
|
|
""" |
1071
|
|
|
# bandwidth = 100 |
1072
|
|
|
self.assertTrue(self.paths_between_all_users("S5:1", flexible={'delay': 50, |
1073
|
|
|
'bandwidth': 100, |
1074
|
|
|
'reliability': 3, |
1075
|
|
|
'ownership': "B"}, |
1076
|
|
|
metrics='bandwidth')) |
1077
|
|
|
|
1078
|
|
|
def test_path8_2_3(self): |
1079
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1080
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1081
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1082
|
|
|
constraint set to 'B' |
1083
|
|
|
|
1084
|
|
|
Tests conducted with flexibility enabled |
1085
|
|
|
""" |
1086
|
|
|
# bandwidth = 100 |
1087
|
|
|
self.assertTrue(self.paths_between_all_users("User1:4", flexible={'delay': 50, |
1088
|
|
|
'bandwidth': 100, |
1089
|
|
|
'reliability': 3, |
1090
|
|
|
'ownership': "B"}, |
1091
|
|
|
metrics='bandwidth')) |
1092
|
|
|
|
1093
|
|
|
def test_path8_2_4(self): |
1094
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1095
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1096
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1097
|
|
|
constraint set to 'B' |
1098
|
|
|
|
1099
|
|
|
Tests conducted with flexibility enabled |
1100
|
|
|
""" |
1101
|
|
|
# bandwidth = 100 |
1102
|
|
|
self.assertTrue(self.paths_between_all_users("User4:3", flexible={'delay': 50, |
1103
|
|
|
'bandwidth': 100, |
1104
|
|
|
'reliability': 3, |
1105
|
|
|
'ownership': "B"}, |
1106
|
|
|
metrics='bandwidth')) |
1107
|
|
|
|
1108
|
|
|
def test_path8_2_5(self): |
1109
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1110
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1111
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1112
|
|
|
constraint set to 'B' |
1113
|
|
|
|
1114
|
|
|
Tests conducted with flexibility enabled |
1115
|
|
|
""" |
1116
|
|
|
# reliability = 3 |
1117
|
|
|
self.assertTrue(self.paths_between_all_users("S4:1", flexible={'delay': 50, |
1118
|
|
|
'bandwidth': 100, |
1119
|
|
|
'reliability': 3, |
1120
|
|
|
'ownership': "B"}, |
1121
|
|
|
metrics='reliability')) |
1122
|
|
|
|
1123
|
|
|
def test_path8_2_6(self): |
1124
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1125
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1126
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1127
|
|
|
constraint set to 'B' |
1128
|
|
|
|
1129
|
|
|
Tests conducted with flexibility enabled |
1130
|
|
|
""" |
1131
|
|
|
# reliability = 3 |
1132
|
|
|
self.assertTrue(self.paths_between_all_users("S5:2", flexible={'delay': 50, |
1133
|
|
|
'bandwidth': 100, |
1134
|
|
|
'reliability': 3, |
1135
|
|
|
'ownership': "B"}, |
1136
|
|
|
metrics='reliability')) |
1137
|
|
|
|
1138
|
|
|
def test_path8_2_7(self): |
1139
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1140
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1141
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1142
|
|
|
constraint set to 'B' |
1143
|
|
|
|
1144
|
|
|
Tests conducted with flexibility enabled |
1145
|
|
|
""" |
1146
|
|
|
# reliability = 3 |
1147
|
|
|
self.assertTrue(self.paths_between_all_users("S5:3", flexible={'delay': 50, |
1148
|
|
|
'bandwidth': 100, |
1149
|
|
|
'reliability': 3, |
1150
|
|
|
'ownership': "B"}, |
1151
|
|
|
metrics='reliability')) |
1152
|
|
|
|
1153
|
|
|
def test_path8_2_8(self): |
1154
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1155
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1156
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1157
|
|
|
constraint set to 'B' |
1158
|
|
|
|
1159
|
|
|
Tests conducted with flexibility enabled |
1160
|
|
|
""" |
1161
|
|
|
# reliability = 3 |
1162
|
|
|
self.assertTrue(self.paths_between_all_users("S6:1", flexible={'delay': 50, |
1163
|
|
|
'bandwidth': 100, |
1164
|
|
|
'reliability': 3, |
1165
|
|
|
'ownership': "B"}, |
1166
|
|
|
metrics='reliability')) |
1167
|
|
|
|
1168
|
|
|
def test_path8_2_9(self): |
1169
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1170
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1171
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1172
|
|
|
constraint set to 'B' |
1173
|
|
|
|
1174
|
|
|
Tests conducted with flexibility enabled |
1175
|
|
|
""" |
1176
|
|
|
# ownership = "B" |
1177
|
|
|
self.assertTrue(self.paths_between_all_users("S4:1", flexible={'delay': 50, |
1178
|
|
|
'bandwidth': 100, |
1179
|
|
|
'reliability': 3, |
1180
|
|
|
'ownership': "B"})) |
1181
|
|
|
|
1182
|
|
|
def test_path8_3_0(self): |
1183
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1184
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1185
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1186
|
|
|
constraint set to 'B' |
1187
|
|
|
|
1188
|
|
|
Tests conducted with flexibility enabled |
1189
|
|
|
""" |
1190
|
|
|
# ownership = "B" |
1191
|
|
|
self.assertTrue(self.paths_between_all_users("S5:2", flexible={'delay': 50, |
1192
|
|
|
'bandwidth': 100, |
1193
|
|
|
'reliability': 3, |
1194
|
|
|
'ownership': "B"})) |
1195
|
|
|
|
1196
|
|
|
def test_path8_3_1(self): |
1197
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1198
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1199
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1200
|
|
|
constraint set to 'B' |
1201
|
|
|
|
1202
|
|
|
Tests conducted with flexibility enabled |
1203
|
|
|
""" |
1204
|
|
|
# ownership = "B" |
1205
|
|
|
self.assertTrue(self.paths_between_all_users("S4:2", flexible={'delay': 50, |
1206
|
|
|
'bandwidth': 100, |
1207
|
|
|
'reliability': 3, |
1208
|
|
|
'ownership': "B"})) |
1209
|
|
|
|
1210
|
|
|
def test_path8_3_2(self): |
1211
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1212
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1213
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1214
|
|
|
constraint set to 'B' |
1215
|
|
|
|
1216
|
|
|
Tests conducted with flexibility enabled |
1217
|
|
|
""" |
1218
|
|
|
# ownership = "B" |
1219
|
|
|
self.assertTrue(self.paths_between_all_users("User1:2", flexible={'delay': 50, |
1220
|
|
|
'bandwidth': 100, |
1221
|
|
|
'reliability': 3, |
1222
|
|
|
'ownership': "B"})) |
1223
|
|
|
|
1224
|
|
|
def test_path8_3_3(self): |
1225
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1226
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1227
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1228
|
|
|
constraint set to 'B' |
1229
|
|
|
|
1230
|
|
|
Tests conducted with flexibility enabled |
1231
|
|
|
""" |
1232
|
|
|
# ownership = "B" |
1233
|
|
|
self.assertTrue(self.paths_between_all_users("S5:4", flexible={'delay': 50, |
1234
|
|
|
'bandwidth': 100, |
1235
|
|
|
'reliability': 3, |
1236
|
|
|
'ownership': "B"})) |
1237
|
|
|
|
1238
|
|
|
def test_path8_3_4(self): |
1239
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1240
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1241
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1242
|
|
|
constraint set to 'B' |
1243
|
|
|
|
1244
|
|
|
Tests conducted with flexibility enabled |
1245
|
|
|
""" |
1246
|
|
|
# ownership = "B" |
1247
|
|
|
self.assertTrue(self.paths_between_all_users("S6:2", flexible={'delay': 50, |
1248
|
|
|
'bandwidth': 100, |
1249
|
|
|
'reliability': 3, |
1250
|
|
|
'ownership': "B"})) |
1251
|
|
|
|
1252
|
|
|
def test_path8_3_5(self): |
1253
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1254
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1255
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1256
|
|
|
constraint set to 'B' |
1257
|
|
|
|
1258
|
|
|
Tests conducted with flexibility enabled |
1259
|
|
|
""" |
1260
|
|
|
# ownership = "B" |
1261
|
|
|
self.assertTrue(self.paths_between_all_users("S6:5", flexible={'delay': 50, |
1262
|
|
|
'bandwidth': 100, |
1263
|
|
|
'reliability': 3, |
1264
|
|
|
'ownership': "B"})) |
1265
|
|
|
|
1266
|
|
|
def test_path8_3_6(self): |
1267
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1268
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1269
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1270
|
|
|
constraint set to 'B' |
1271
|
|
|
|
1272
|
|
|
Tests conducted with flexibility enabled |
1273
|
|
|
""" |
1274
|
|
|
# ownership = "B" |
1275
|
|
|
self.assertTrue(self.paths_between_all_users("S10:1", flexible={'delay': 50, |
1276
|
|
|
'bandwidth': 100, |
1277
|
|
|
'reliability': 3, |
1278
|
|
|
'ownership': "B"})) |
1279
|
|
|
|
1280
|
|
|
def test_path8_3_7(self): |
1281
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1282
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1283
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1284
|
|
|
constraint set to 'B' |
1285
|
|
|
|
1286
|
|
|
Tests conducted with flexibility enabled |
1287
|
|
|
""" |
1288
|
|
|
# ownership = "B" |
1289
|
|
|
self.assertTrue(self.paths_between_all_users("S8:6", flexible={'delay': 50, |
1290
|
|
|
'bandwidth': 100, |
1291
|
|
|
'reliability': 3, |
1292
|
|
|
'ownership': "B"})) |
1293
|
|
|
|
1294
|
|
|
def test_path8_3_8(self): |
1295
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1296
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1297
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1298
|
|
|
constraint set to 'B' |
1299
|
|
|
|
1300
|
|
|
Tests conducted with flexibility enabled |
1301
|
|
|
""" |
1302
|
|
|
# ownership = "B" |
1303
|
|
|
self.assertTrue(self.paths_between_all_users("S10:2", flexible={'delay': 50, |
1304
|
|
|
'bandwidth': 100, |
1305
|
|
|
'reliability': 3, |
1306
|
|
|
'ownership': "B"})) |
1307
|
|
|
|
1308
|
|
|
def test_path8_3_9(self): |
1309
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1310
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1311
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1312
|
|
|
constraint set to 'B' |
1313
|
|
|
|
1314
|
|
|
Tests conducted with flexibility enabled |
1315
|
|
|
""" |
1316
|
|
|
# ownership = "B" |
1317
|
|
|
self.assertTrue(self.paths_between_all_users("S10:3", flexible={'delay': 50, |
1318
|
|
|
'bandwidth': 100, |
1319
|
|
|
'reliability': 3, |
1320
|
|
|
'ownership': "B"})) |
1321
|
|
|
|
1322
|
|
|
def test_path8_4_0(self): |
1323
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1324
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1325
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1326
|
|
|
constraint set to 'B' |
1327
|
|
|
|
1328
|
|
|
Tests conducted with flexibility enabled |
1329
|
|
|
""" |
1330
|
|
|
# ownership = "B" |
1331
|
|
|
self.assertTrue(self.paths_between_all_users("User2:1", flexible={'delay': 50, |
1332
|
|
|
'bandwidth': 100, |
1333
|
|
|
'reliability': 3, |
1334
|
|
|
'ownership': "B"})) |
1335
|
|
|
|
1336
|
|
|
##### |
1337
|
|
|
|
1338
|
|
|
def test_path9(self): |
1339
|
|
|
"""Tests paths between all users using constrained path algorithm, |
1340
|
|
|
with the delay constraint set to 50, the bandwidth constraint |
1341
|
|
|
set to 100, the reliability constraint set to 3, and the ownership |
1342
|
|
|
constraint set to 'B' |
1343
|
|
|
|
1344
|
|
|
Tests conducted with all but ownership flexible |
1345
|
|
|
""" |
1346
|
|
|
combos = combinations(["User1", "User2", "User3", "User4"], 2) |
1347
|
|
|
self.initializer() |
1348
|
|
|
|
1349
|
|
|
for point_a, point_b in combos: |
1350
|
|
|
results = self.get_path_constrained(point_a, point_b, |
1351
|
|
|
base={"ownership": "B"}, |
1352
|
|
|
flexible={"delay": 50, |
1353
|
|
|
"bandwidth": 100, |
1354
|
|
|
"reliability": 3}) |
1355
|
|
|
for result in results: |
1356
|
|
|
# delay = 50 checks |
1357
|
|
|
if "delay" in result["metrics"]: |
1358
|
|
|
for path in result["paths"]: |
1359
|
|
|
self.assertNotIn("S1:1", path) |
1360
|
|
|
self.assertNotIn("S2:1", path) |
1361
|
|
|
self.assertNotIn("S3:1", path) |
1362
|
|
|
self.assertNotIn("S5:1", path) |
1363
|
|
|
self.assertNotIn("S4:2", path) |
1364
|
|
|
self.assertNotIn("User1:2", path) |
1365
|
|
|
self.assertNotIn("S5:5", path) |
1366
|
|
|
self.assertNotIn("S8:2", path) |
1367
|
|
|
self.assertNotIn("S5:6", path) |
1368
|
|
|
self.assertNotIn("User1:3", path) |
1369
|
|
|
self.assertNotIn("S6:3", path) |
1370
|
|
|
self.assertNotIn("S9:1", path) |
1371
|
|
|
self.assertNotIn("S6:4", path) |
1372
|
|
|
self.assertNotIn("S9:2", path) |
1373
|
|
|
self.assertNotIn("S6:5", path) |
1374
|
|
|
self.assertNotIn("S10:1", path) |
1375
|
|
|
self.assertNotIn("S8:5", path) |
1376
|
|
|
self.assertNotIn("S9:4", path) |
1377
|
|
|
self.assertNotIn("User1:4", path) |
1378
|
|
|
self.assertNotIn("User4:3", path) |
1379
|
|
|
|
1380
|
|
|
# bandwidth = 100 checks |
1381
|
|
|
if "bandwidth" in result["metrics"]: |
1382
|
|
|
for path in result["paths"]: |
1383
|
|
|
self.assertNotIn("S3:1", path) |
1384
|
|
|
self.assertNotIn("S5:1", path) |
1385
|
|
|
self.assertNotIn("User1:4", path) |
1386
|
|
|
self.assertNotIn("User4:3", path) |
1387
|
|
|
|
1388
|
|
|
# reliability = 3 checks |
1389
|
|
|
if "reliability" in result["metrics"]: |
1390
|
|
|
for path in result["paths"]: |
1391
|
|
|
self.assertNotIn("S4:1", path) |
1392
|
|
|
self.assertNotIn("S5:2", path) |
1393
|
|
|
self.assertNotIn("S5:3", path) |
1394
|
|
|
self.assertNotIn("S6:1", path) |
1395
|
|
|
|
1396
|
|
|
# ownership = "B" checks |
1397
|
|
|
self.assertIn("ownership", result["metrics"]) |
1398
|
|
|
for path in result["paths"]: |
1399
|
|
|
self.assertNotIn("S4:1", path) |
1400
|
|
|
self.assertNotIn("S5:2", path) |
1401
|
|
|
self.assertNotIn("S4:2", path) |
1402
|
|
|
self.assertNotIn("User1:2", path) |
1403
|
|
|
self.assertNotIn("S5:4", path) |
1404
|
|
|
self.assertNotIn("S6:2", path) |
1405
|
|
|
self.assertNotIn("S6:5", path) |
1406
|
|
|
self.assertNotIn("S10:1", path) |
1407
|
|
|
self.assertNotIn("S8:6", path) |
1408
|
|
|
self.assertNotIn("S10:2", path) |
1409
|
|
|
self.assertNotIn("S10:3", path) |
1410
|
|
|
self.assertNotIn("User2:1", path) |
1411
|
|
|
|
1412
|
|
|
def test_path10(self): |
1413
|
|
|
"""Tests that TypeError is generated by get_path_constrained |
1414
|
|
|
|
1415
|
|
|
Tests with ownership using an int type rather than string |
1416
|
|
|
""" |
1417
|
|
|
self.initializer() |
1418
|
|
|
|
1419
|
|
|
with self.assertRaises(TypeError): |
1420
|
|
|
self.get_path_constrained( |
1421
|
|
|
"User1", "User2", base={"ownership": 1}) |
1422
|
|
|
|