def test_version(self):
     try:
         isrcsubmit.main([SCRIPT_NAME, "--version"])
     except SystemExit:
         pass
     finally:
         self.assertTrue(isrcsubmit.__version__ in self._output().strip())
 def test_help(self):
     try:
         isrcsubmit.main([SCRIPT_NAME, "-h"])
     except SystemExit:
         pass
     finally:
         self.assertTrue(self._output().strip())
 def test_help(self):
     try:
         isrcsubmit.main([SCRIPT_NAME, "-h"])
     except SystemExit:
         pass
     finally:
         self.assertTrue(self._output().strip())
 def test_version(self):
     try:
         isrcsubmit.main([SCRIPT_NAME, "--version"])
     except SystemExit:
         pass
     finally:
         self.assertTrue(isrcsubmit.__version__ in self._output().strip())
 def test_libdiscid(self):
     global mocked_disc_id
     mocked_disc_id = "TqvKjMu7dMliSfmVEBtrL7sBSno-"
     # we use defaults to questions -> no settings here
     try:
         isrcsubmit.main([SCRIPT_NAME, "--backend", "libdiscid"])
     except SystemExit:
         pass
     finally:
         self.assertTrue(isrcsubmit.__version__ in self._output().strip())
         self.assert_output("mocked libdiscid")
         self.assert_output("TqvKjMu7dMliSfmVEBtrL7sBSno-")
         self.assert_output("07090529-0fbf-4bd3-adc4-fe627343976d")
         self.assert_output("submit the disc?")
         self.assert_output("DEC680000220 is already attached to track 4")
         self.assert_output("No new ISRCs")
 def test_cdrdao(self):
     global mocked_disc_id
     mocked_disc_id = "hSI7B4G4AkB5.DEBcW.3KCn.D_E-"
     answers["choice"] = 1
     try:
         isrcsubmit.main([SCRIPT_NAME, "--backend", "cdrdao", "--device", "/dev/cdrw"])
     except SystemExit:
         pass
     finally:
         self.assertTrue(isrcsubmit.__version__ in self._output().strip())
         self.assert_output("mocked cdrdao")
         self.assert_output("hSI7B4G4AkB5.DEBcW.3KCn.D_E-")
         self.assert_output("none of these")
         self.assert_output("174a5513-73d1-3c9d-a316-3c1c179e35f8")
         self.assert_output("GBBBN7902023 is already attached to track 7")
         self.assert_output("No new ISRCs")
 def test_libdiscid(self):
     global mocked_disc_id
     mocked_disc_id = "TqvKjMu7dMliSfmVEBtrL7sBSno-"
     # we use defaults to questions -> no settings here
     try:
         isrcsubmit.main([SCRIPT_NAME, "--backend", "libdiscid"])
     except SystemExit:
         pass
     finally:
         self.assertTrue(isrcsubmit.__version__ in self._output().strip())
         self.assert_output("mocked libdiscid")
         self.assert_output("TqvKjMu7dMliSfmVEBtrL7sBSno-")
         self.assert_output("07090529-0fbf-4bd3-adc4-fe627343976d")
         self.assert_output("submit the disc?")
         self.assert_output("DEC680000220 is already attached to track 4")
         self.assert_output("No new ISRCs")
Example #8
0
 def test_cdrdao(self):
     global mocked_disc_id
     mocked_disc_id = "hSI7B4G4AkB5.DEBcW.3KCn.D_E-"
     answers["choice"] = 1
     try:
         isrcsubmit.main([SCRIPT_NAME, "--backend", "cdrdao", "--device", "/dev/cdrw"])
     except SystemExit:
         pass
     finally:
         self.assertTrue(isrcsubmit.__version__ in self._output().strip())
         self.assert_output("mocked cdrdao")
         self.assert_output("hSI7B4G4AkB5.DEBcW.3KCn.D_E-")
         self.assert_output("none of these")
         self.assert_output("174a5513-73d1-3c9d-a316-3c1c179e35f8")
         self.assert_output("GBBBN7902023 is already attached to track 7")
         self.assert_output("No new ISRCs")