mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
lint: Anti-Features validator uses names from config
This commit is contained in:
parent
d6dba05ec3
commit
d5a1439457
4 changed files with 83 additions and 39 deletions
|
|
@ -178,26 +178,6 @@ class MetadataTest(unittest.TestCase):
|
|||
'fake.app.id',
|
||||
)
|
||||
|
||||
def test_check_metadata_AntiFeatures(self):
|
||||
fdroidserver.metadata.warnings_action = 'error'
|
||||
|
||||
app = fdroidserver.metadata.App()
|
||||
self.assertIsNone(metadata.check_metadata(app))
|
||||
|
||||
app['AntiFeatures'] = []
|
||||
self.assertIsNone(metadata.check_metadata(app))
|
||||
|
||||
app['AntiFeatures'] = ['Ads', 'UpstreamNonFree']
|
||||
self.assertIsNone(metadata.check_metadata(app))
|
||||
|
||||
app['AntiFeatures'] = ['Ad']
|
||||
with self.assertRaises(fdroidserver.exception.MetaDataException):
|
||||
metadata.check_metadata(app)
|
||||
|
||||
app['AntiFeatures'] = ['Adss']
|
||||
with self.assertRaises(fdroidserver.exception.MetaDataException):
|
||||
metadata.check_metadata(app)
|
||||
|
||||
def test_valid_funding_yml_regex(self):
|
||||
"""Check the regex can find all the cases"""
|
||||
with (self.basedir / 'funding-usernames.yaml').open() as fp:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue