mirror of
				https://github.com/Thor77/TeamspeakStats.git
				synced 2025-11-03 15:22:45 -05:00 
			
		
		
		
	Rewrite test integration test
to assert two runs with the same cache_path return the same servers (after writing and reading from cache).
This commit is contained in:
		
							parent
							
								
									9c2daf630c
								
							
						
					
					
						commit
						ab99c5f64c
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -66,5 +66,10 @@ def test_cache_needs_parsing(cache, tmpdir):
 | 
			
		|||
 | 
			
		||||
# INTEGRATION
 | 
			
		||||
def test_cache_integration(cache_path):
 | 
			
		||||
    assert next(parse_logs(testlog_path, online_dc=False)) == \
 | 
			
		||||
        next(parse_logs(testlog_path, online_dc=False, cache_path=cache_path))
 | 
			
		||||
    first_run = list(parse_logs(
 | 
			
		||||
        testlog_path, online_dc=False, cache_path=cache_path
 | 
			
		||||
    ))
 | 
			
		||||
    second_run = list(parse_logs(
 | 
			
		||||
        testlog_path, online_dc=False, cache_path=cache_path
 | 
			
		||||
    ))
 | 
			
		||||
    assert first_run == second_run
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue