Пример #1
0
    def test_attach_package_info_u1client(self):
        """Attach the package information for ubuntuone-client."""
        called = []
        import source_magicicada

        self.patch(source_magicicada, "attach_related_packages", lambda *a: called.extend(a))
        d = {}
        source_magicicada.add_info(d)
        self.assertIs(called[0], d)
        self.assertEqual(called[1], ["ubuntuone-client"])
Пример #2
0
    def test_attach_log_file(self):
        """Attach the log file."""
        called = []
        import source_magicicada

        self.patch(source_magicicada, "attach_file_if_exists", lambda *a: called.extend(a))
        d = {}
        source_magicicada.add_info(d)
        self.assertIs(called[0], d)
        self.assertEqual(called[1], logger.get_filename())
        self.assertEqual(called[2], "MagicicadaLog")