~marcoceppi/charm-tools/patch-generate-path

« back to all changes in this revision

Viewing changes to tests/test_charm_proof.py

  • Committer: Tim Van Steenburgh
  • Date: 2015-08-25 19:00:20 UTC
  • mfrom: (356.1.1 tags)
  • Revision ID: tim.van.steenburgh@canonical.com-20150825190020-uqb1bkc57xbu5eqj
[marcoceppi] Make categories a WARN to prevent promulgation of charms

Show diffs side-by-side

added added

removed removed

Lines of Context:
371
371
        )
372
372
        linter = Mock()
373
373
        validate_categories_and_tags({'categories': 'foo'}, linter)
374
 
        linter.warn.assert_called_once_with(warning)
 
374
        linter.warn.assert_any_call(warning)
375
375
        linter.reset_mock()
376
376
        validate_categories_and_tags({'categories': []}, linter)
377
 
        linter.warn.assert_called_once_with(warning)
 
377
        linter.warn.assert_any_call(warning)
378
378
 
379
379
    def test_valid_categories(self):
380
380
        """Charm has valid categories, which should be changed to tags"""
384
384
        )
385
385
        linter = Mock()
386
386
        validate_categories_and_tags({'categories': ['misc']}, linter)
387
 
        linter.info.assert_called_once_with(info)
388
 
        self.assertFalse(linter.warn.called)
 
387
        linter.warn.assert_called_once_with(info)
 
388
        self.assertFalse(linter.info.called)
389
389
        self.assertFalse(linter.err.called)
390
390
 
391
391