def test_snap_deprecation(self): """Test that using the 'snap' keyword results in a warning.""" fake_logger = fixtures.FakeLogger(level=logging.WARN) self.useFixture(fake_logger) self.make_snapcraft_project([("part1", dict(plugin="nil", snap=["foo"]))]) self.assertThat( fake_logger.output, Contains(deprecations._deprecation_message("dn1")) )
def test_snap_deprecation(self): """Test that using the 'snap' keyword results in a warning.""" fake_logger = fixtures.FakeLogger(level=logging.WARN) self.useFixture(fake_logger) self.make_snapcraft_project([("part1", dict(plugin="nil", snap=["foo"]))]) self.assertThat(fake_logger.output, Contains(deprecations._deprecation_message("dn1")))
def test_snap_deprecation(self): """Test that using the 'snap' keyword results in a warning.""" fake_logger = fixtures.FakeLogger(level=logging.WARN) self.useFixture(fake_logger) self.make_snapcraft_yaml("""name: test version: "1" summary: test description: test confinement: strict parts: part1: plugin: go stage-packages: [fswebcam] snap: [foo] """) project_loader.load_config() self.assertThat(fake_logger.output, Contains(deprecations._deprecation_message('dn1')))
def test_snap_deprecation(self, mock_loadPlugin): """Test that using the 'snap' keyword results in a warning.""" fake_logger = fixtures.FakeLogger(level=logging.WARN) self.useFixture(fake_logger) self.make_snapcraft_yaml("""name: test version: "1" summary: test description: test confinement: strict parts: part1: plugin: go stage-packages: [fswebcam] snap: [foo] """) project_loader.load_config() self.assertThat(fake_logger.output, Contains(deprecations._deprecation_message('dn1')))