Ejemplo n.º 1
0
 def test_generate_from_samples_directory(self, sourcedir, targetdir):
     apic = pytest.config.getoption('apic')
     if not apic:
         apic = [['http://mock', 'admin', 'password', False]]
     apic = apic[0]
     url, user, password, secure = apic
     url = str(url).split('//')[1]
     args = Namespace(sourcedir=sourcedir, filein=None, stdin=None,
                      targetdir=targetdir, ip=url, password=password,
                      nocommit=True)
     assert arya.runfromcli(args)
Ejemplo n.º 2
0
 def test_generate_by_files(self, testfiles):
     apic = pytest.config.getoption('apic')
     if not apic:
         apic = [['http://mock', 'admin', 'password', False]]
     apic = apic[0]
     url, user, password, secure = apic
     url = str(url).split('//')[1]
     args = Namespace(
         stdin=None, filein=testfiles[0], ip=url, password=password,
         nocommit=True)
     assert arya.runfromcli(args)