Tests that replacing mutually exclusive client groups works well.
(ok_small)
| 950 | |
| 951 | |
| 952 | def test_replacing_client_groups(ok_small): |
| 953 | """ |
| 954 | Tests that replacing mutually exclusive client groups works well. |
| 955 | """ |
| 956 | assert_equal(ok_small.num_groups, 0) |
| 957 | assert_equal(ok_small.groups(), []) |
| 958 | |
| 959 | # Let's add the first client to a group, and define a new data instance |
| 960 | # that has a mutually exclusive group. |
| 961 | clients = ok_small.clients() |
| 962 | clients[0] = Client(1, 1, delivery=[1], required=False, group=0) |
| 963 | data = ok_small.replace(clients=clients, groups=[ClientGroup([1])]) |
| 964 | |
| 965 | # There should now be a single client group (at index 0) that has the first |
| 966 | # client as its only member. |
| 967 | assert_equal(data.num_groups, 1) |
| 968 | assert_equal(data.group(0).clients, [1]) |
| 969 | |
| 970 | |
| 971 | def test_client_eq(): |
nothing calls this directly
no test coverage detected