blob: 8adc202153ebe08fe7161072f8c5f44734b266d6 [file] [log] [blame]
Adam Israel5e08a0e2018-09-06 19:22:47 -04001# A simple test to verify we're using the right libjuju module
2from n2vc.vnf import N2VC # noqa: F401
3import sys
4
5
6def test_libjuju():
7 """Test the module import for our vendored version of libjuju.
8
9 Test and verify that the version of libjuju being imported by N2VC is our
10 vendored version, not one installed externally.
11 """
12 for name in sys.modules:
13 if name.startswith("juju"):
14 module = sys.modules[name]
15 if getattr(module, "__file__"):
16 assert module.__file__.find("N2VC/modules/libjuju/juju")
17
18 return