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

22 lines
670 B
Python
Raw Normal View History

2018-12-17 20:40:11 +00:00
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")
2018-12-17 21:43:46 +00:00
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")