def test_file(self):
     opts, _ = repoquery.parse_arguments(['/var/foobar'])
     self.assertIsNone(opts.file)
 def test_options(self):
     for arg in ('conflicts', 'enhances', 'obsoletes', 'provides', 'recommends',
                 'requires', 'suggests', 'supplements'):
         opts, _ = repoquery.parse_arguments(['--' + arg])
         self.assertEqual(opts.packageatr, arg)
 def test_conflict(self):
     with self.assertRaises(dnf.exceptions.Error):
         repoquery.parse_arguments(['--conflicts', '%{name}', '--provides'])
 def test_parse(self):
     opts, _ = repoquery.parse_arguments(['--whatrequires', 'prudence'])
     self.assertIsNone(opts.whatprovides)
     self.assertEqual(opts.whatrequires, 'prudence')
     self.assertEqual(opts.queryformat, repoquery.QFORMAT_DEFAULT)
 def test_provides(self):
     opts, _ = repoquery.parse_arguments(['--provides'])
     self.assertEqual(opts.queryformat, '%{provides}')
 def test_provides(self):
     opts, _ = repoquery.parse_arguments(['--provides'])
     self.assertEqual(opts.queryformat, '%{provides}')