Default project_name to dirname of fig.yml

Signed-off-by: Ryan Brainard <brainard@heroku.com>
This commit is contained in:
Ryan Brainard 2014-07-12 23:35:37 -07:00
commit e9c2f2c5fb
3 changed files with 24 additions and 15 deletions

View file

@ -5,6 +5,11 @@ from fig.cli.main import TopLevelCommand
from fig.packages.six import StringIO
class CLITestCase(unittest.TestCase):
def test_project_name_defaults_to_dirname(self):
command = TopLevelCommand()
command.base_dir = 'tests/fixtures/simple-figfile'
self.assertEquals('simplefigfile', command.project_name)
def test_yaml_filename_check(self):
command = TopLevelCommand()
command.base_dir = 'tests/fixtures/longer-filename-figfile'