mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 14:30:30 +03:00 
			
		
		
		
	use common var for 'config.yml', standarize on UTF-8
This makes it easy to track all the places that use config.yml, and hopefully makes things feel cleaner. This also standardizes all places where config.yml is written out to use UTF-8 as the file encoding. This also includes a lot of black code format fixes.
This commit is contained in:
		
							parent
							
								
									1f96a84f9a
								
							
						
					
					
						commit
						3cc6c09ffc
					
				
					 14 changed files with 189 additions and 173 deletions
				
			
		| 
						 | 
				
			
			@ -18,7 +18,6 @@ import shutil
 | 
			
		|||
import sys
 | 
			
		||||
import unittest
 | 
			
		||||
import tempfile
 | 
			
		||||
from pathlib import Path
 | 
			
		||||
from unittest import mock
 | 
			
		||||
 | 
			
		||||
from fdroidserver import publish
 | 
			
		||||
| 
						 | 
				
			
			@ -96,7 +95,7 @@ class PublishTest(unittest.TestCase):
 | 
			
		|||
        ]
 | 
			
		||||
 | 
			
		||||
        os.chdir(self.testdir)
 | 
			
		||||
        Path('config.yml').write_text('')
 | 
			
		||||
        common.write_config_file('')
 | 
			
		||||
 | 
			
		||||
        publish.store_stats_fdroid_signing_key_fingerprints(appids, indent=2)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -118,7 +117,7 @@ class PublishTest(unittest.TestCase):
 | 
			
		|||
        self.assertEqual(expected, common.load_stats_fdroid_signing_key_fingerprints())
 | 
			
		||||
 | 
			
		||||
        yaml = ruamel.yaml.YAML(typ='safe')
 | 
			
		||||
        with open('config.yml') as fp:
 | 
			
		||||
        with open(common.CONFIG_FILE) as fp:
 | 
			
		||||
            config = yaml.load(fp)
 | 
			
		||||
        self.assertEqual(
 | 
			
		||||
            'c58460800c7b250a619c30c13b07b7359a43e5af71a4352d86c58ae18c9f6d41',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue