def assert_supervisor_config(self, bench_name, use_rq=True):
		conf_src = os.path.join(os.path.abspath(self.benches_path), bench_name, 'config', 'supervisor.conf')

		supervisor_conf_dir = get_supervisor_confdir()
		conf_dest = "{supervisor_conf_dir}/{bench_name}.conf".format(supervisor_conf_dir=supervisor_conf_dir, bench_name=bench_name)

		self.assertTrue(os.path.exists(conf_src))
		self.assertTrue(os.path.exists(conf_dest))

		# symlink matches
		self.assertEquals(os.path.realpath(conf_dest), conf_src)

		# file content
		with open(conf_src, "r") as f:
			f = f.read().decode("utf-8")

			tests = [
				"program:{bench_name}-frappe-web",
				"program:{bench_name}-redis-cache",
				"program:{bench_name}-redis-queue",
				"program:{bench_name}-redis-socketio",
				"program:{bench_name}-node-socketio",
				"group:{bench_name}-web",
				"group:{bench_name}-workers",
				"group:{bench_name}-redis"
			]

			if use_rq:
				tests.extend([
					"program:{bench_name}-frappe-schedule",
					"program:{bench_name}-frappe-default-worker",
					"program:{bench_name}-frappe-short-worker",
					"program:{bench_name}-frappe-long-worker"
				])

			else:
				tests.extend([
					"program:{bench_name}-frappe-workerbeat",
					"program:{bench_name}-frappe-worker",
					"program:{bench_name}-frappe-longjob-worker",
					"program:{bench_name}-frappe-async-worker"
				])

			for key in tests:
				self.assertTrue(key.format(bench_name=bench_name) in f)
	def assert_supervisor_link(self, bench_name):
		supervisor_conf_dir = get_supervisor_confdir()
		supervisor_conf_name = '{bench_name}.conf'.format(bench_name=bench_name)
		supervisor_conf_path = os.path.join(supervisor_conf_dir, supervisor_conf_name)

		self.assertFalse(os.path.islink(supervisor_conf_path))