This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
catfish/tests/test_project/test_project.py
2018-12-18 15:34:57 +00:00

25 lines
751 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")
def test_name(self):
self.assertEqual(self.project.name, 'example')