예제 #1
0
 def test_wrong(self):
     text = "not a valid value for dictionary value @ data['name']"
     with ShouldFailSchemaWith(text):
         Plugin.schema(dict(type='packages', name='foo'))
예제 #2
0
 def test_dpkg(self):
     self.Popen.set_command('dpkg -l', stdout=b'some packages')
     plugin = Plugin(**Plugin.schema(dict(type='packages', name='dpkg')))
     plugin.process(self.dir.path)
     self.dir.compare(expected=['dpkg'])
     compare(b'some packages', self.dir.read('dpkg'))