def test_write_to_empty_includes(self): update_includes(['a.tasks', 'b.tasks']) # The includes file will be created # in the temp folder for this test with open('{0}/celeryd-includes' .format(self.temp_folder), mode='r') as f: includes = f.read() self.assertEquals("INCLUDES=a.tasks,b.tasks\n", includes)
def test_write_to_empty_includes(self): update_includes(['a.tasks', 'b.tasks']) # The includes file will be created # in the temp folder for this test with open('{0}/celeryd-includes'.format(self.temp_folder), mode='r') as f: includes = f.read() self.assertEquals("INCLUDES=a.tasks,b.tasks\n", includes)
def test_write_to_existing_includes(self): # Create initial includes file update_includes(['test.tasks']) # Append to that file update_includes(['a.tasks', 'b.tasks']) with open('{0}/celeryd-includes'.format(self.temp_folder), mode='r') as f: includes = f.read() self.assertEquals("INCLUDES=test.tasks,a.tasks,b.tasks\n", includes)
def test_write_to_existing_includes(self): # Create initial includes file update_includes(['test.tasks']) # Append to that file update_includes(['a.tasks', 'b.tasks']) with open('{0}/celeryd-includes' .format(self.temp_folder), mode='r') as f: includes = f.read() self.assertEquals( "INCLUDES=test.tasks,a.tasks,b.tasks\n", includes)