diff options
Diffstat (limited to 'tests/test_git_config.py')
| -rw-r--r-- | tests/test_git_config.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_git_config.py b/tests/test_git_config.py index 3300c12f..44ff5974 100644 --- a/tests/test_git_config.py +++ b/tests/test_git_config.py | |||
| @@ -104,6 +104,23 @@ class GitConfigReadOnlyTests(unittest.TestCase): | |||
| 104 | for key, value in TESTS: | 104 | for key, value in TESTS: |
| 105 | self.assertEqual(value, self.config.GetInt('section.%s' % (key,))) | 105 | self.assertEqual(value, self.config.GetInt('section.%s' % (key,))) |
| 106 | 106 | ||
| 107 | def test_GetSyncAnalysisStateData(self): | ||
| 108 | """Test config entries with a sync state analysis data.""" | ||
| 109 | superproject_logging_data = {} | ||
| 110 | superproject_logging_data['test'] = False | ||
| 111 | options = type('options', (object,), {})() | ||
| 112 | options.verbose = 'true' | ||
| 113 | TESTS = ( | ||
| 114 | ('superproject.test', 'false'), | ||
| 115 | ('options.verbose', 'true'), | ||
| 116 | ('main.version', '1'), | ||
| 117 | ) | ||
| 118 | self.config.UpdateSyncAnalysisState(options, superproject_logging_data) | ||
| 119 | sync_data = self.config.GetSyncAnalysisStateData() | ||
| 120 | for key, value in TESTS: | ||
| 121 | self.assertEqual(sync_data[f'{git_config.SYNC_STATE_PREFIX}{key}'], value) | ||
| 122 | self.assertTrue(sync_data[f'{git_config.SYNC_STATE_PREFIX}main.synctime']) | ||
| 123 | |||
| 107 | 124 | ||
| 108 | class GitConfigReadWriteTests(unittest.TestCase): | 125 | class GitConfigReadWriteTests(unittest.TestCase): |
| 109 | """Read/write tests of the GitConfig class.""" | 126 | """Read/write tests of the GitConfig class.""" |
