2 Test N2VC's ssh key generation
11 async def test_model_create():
12 """Test the creation of a new model."""
13 client
= base
.get_n2vc()
15 model_name
= "test-{}".format(
16 uuid
.uuid4().hex[-4:],
19 pytest
.assume(await client
.CreateNetworkService(model_name
))
20 pytest
.assume(await client
.DestroyNetworkService(model_name
))
21 pytest
.assume(await client
.logout())
25 async def test_destroy_non_existing_network_service():
26 """Destroy a model that doesn't exist."""
28 client
= base
.get_n2vc()
30 model_name
= "test-{}".format(
31 uuid
.uuid4().hex[-4:],
34 with pytest
.raises(n2vc
.vnf
.NetworkServiceDoesNotExist
):
35 pytest
.assume(await client
.DestroyNetworkService(model_name
))
37 pytest
.assume(await client
.logout())
41 async def test_model_create_duplicate():
42 """Create a new model, and try to create the same model."""
43 client
= base
.get_n2vc()
45 model_name
= "test-{}".format(
46 uuid
.uuid4().hex[-4:],
49 # Try to recreate bug 628
50 for x
in range(0, 1000):
51 model
= await client
.get_model(model_name
)
54 pytest
.assume(await client
.DestroyNetworkService(model_name
))
55 pytest
.assume(await client
.logout())