21 lines
670 B
Python
21 lines
670 B
Python
from catfish.project import Project
|
|
from tests import BaseTestCase
|
|
|
|
|
|
class ProjectTestCase(BaseTestCase):
|
|
def setUp(self):
|
|
super().setUp()
|
|
self.project = Project(self.EXAMPLE_DIR)
|
|
|
|
def test_exists(self):
|
|
self.assertTrue(self.project.exists())
|
|
|
|
def test_cant_create_nonexistent_directory(self):
|
|
with self.assertRaises(AssertionError):
|
|
Project("/nonexistent")
|
|
|
|
def test_read_processes(self):
|
|
self.assertEqual(len(self.project.processes), 1)
|
|
process = self.project.processes[0]
|
|
self.assertEqual(process.name, "web")
|
|
self.assertEqual(process.command, "python -m http.server $PORT")
|