def test_name_is_unique_for_each_distro(self): # Script instances for different distros get different names. self.assertNotEqual( GenerateExtraOverrides( test_args=["-d", self.factory.makeDistribution().name]).name, GenerateExtraOverrides( test_args=["-d", self.factory.makeDistribution().name]).name)
def makeScript(self, distribution, run_setup=True, extra_args=None): """Create a script for testing.""" test_args = [] if distribution is not None: test_args.extend(["-d", distribution.name]) if extra_args is not None: test_args.extend(extra_args) script = GenerateExtraOverrides(test_args=test_args) script.logger = DevNullLogger() script.txn = FakeTransaction() if distribution is not None and run_setup: script.setUp() else: script.distribution = distribution return script
def test_name_is_consistent(self): # Script instances for the same distro get the same name. distro = self.factory.makeDistribution() self.assertEqual( GenerateExtraOverrides(test_args=["-d", distro.name]).name, GenerateExtraOverrides(test_args=["-d", distro.name]).name)
#!/usr/bin/python -S # # Copyright 2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Generate extra overrides using Germinate.""" import _pythonpath from lp.archivepublisher.scripts.generate_extra_overrides import ( GenerateExtraOverrides, ) if __name__ == '__main__': script = GenerateExtraOverrides( "generate-extra-overrides", dbuser='******') script.lock_and_run()