Пример #1
0
    def test_anonymize_db(self):

        # upload firmware
        self.login()
        self.add_namespace()
        self.upload()
        self.logout()

        # anonymize everything
        from lvfs import db, app
        from lvfs.dbutils import anonymize_db
        with app.app_context():
            anonymize_db(db)

        # check the device is not listed
        self.login()
        rv = self.app.get('/lvfs/firmware/')
        assert b'ColorHug2' not in rv.data, rv.data
Пример #2
0
def anonymizedb_command():
    anonymize_db(db)