mirror of
				https://github.com/bspeice/metrik
				synced 2025-11-03 18:00:51 -05:00 
			
		
		
		
	Make sure there's a newline for the cron jobs
This commit is contained in:
		@ -1,7 +1,7 @@
 | 
			
		||||
from unittest import TestCase
 | 
			
		||||
from datetime import datetime
 | 
			
		||||
 | 
			
		||||
from metrik.batch import flows
 | 
			
		||||
from metrik.batch import flows, build_cron_file
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class BatchTest(TestCase):
 | 
			
		||||
@ -11,3 +11,8 @@ class BatchTest(TestCase):
 | 
			
		||||
        for flow_name, flow_class in flows.items():
 | 
			
		||||
            assert flow_class(present=present,
 | 
			
		||||
                              live=live).get_schedule() is not None
 | 
			
		||||
 | 
			
		||||
    def test_cron_string(self):
 | 
			
		||||
        cron_string = build_cron_file()
 | 
			
		||||
        assert len(cron_string.split('\n')) == len(flows) + 1
 | 
			
		||||
        assert cron_string[-1] == '\n'
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user