Пример #1
0
 def test_create_profile(self):
     """
     Test create_profile()
     """
     self.datastore.create_profile("TEST")
     rules = Rules(id="TEST",
                   inbound_rules=[Rule(action="allow",
                                       src_tag="TEST"),
                                  Rule(action="deny")],
                   outbound_rules=[Rule(action="allow")])
     expected_calls = [call(TEST_PROFILE_PATH + "tags", '["TEST"]'),
                       call(TEST_PROFILE_PATH + "rules", rules.to_json())]
     self.etcd_client.write.assert_has_calls(expected_calls, any_order=True)