import unittest
import os
from subprocess import check_call
from sh import ls


mountpoint = '/tmp/spotifile_test_mount'
class SpotifileTestClass(unittest.TestCase):
	@classmethod
	def setUpClass(cls):
		if not os.path.exists(mountpoint):
			os.mkdir(mountpoint)

	@classmethod
	def tearDownClass(cls):
		if os.path.exists(mountpoint):
			os.rmdir(mountpoint)

	def setUp(self):
		check_call(['./spotifile', mountpoint])

	def tearDown(self):
		check_call(['fusermount', '-u', mountpoint])

	def test_ls(self):
		assert 'connection' in ls(mountpoint)

Add simple test to check that we populate the root as expected
tests: Add simple test to check that we populate the root as expected

Signed-off-by: Anton Lofgren <64e2cb85477d4abaea4b354af986fde12a3e64f3@op5.com>
