Skip to content

Commit

Permalink
Added config test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankanno committed Sep 17, 2014
1 parent 9c706c4 commit dec306a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Empty file.
6 changes: 5 additions & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@
from locust_swarm.config import DEFAULT_NUM_SLAVES
from locust_swarm.config import DEFAULT_CUSTOM_TAG_NAME
from locust_swarm.config import get_config
import os
import unittest


class TestConfig(unittest.TestCase):

def setUp(self):
self.cwd = os.path.dirname(os.path.realpath(__file__))

def test_default_variables(self):
eq_('locust-swarm.cfg', DEFAULT_CFG_FILEPATH)
eq_('locust-master', DEFAULT_MASTER_ROLE_NAME)
Expand All @@ -30,6 +34,6 @@ def test_get_config_with_invalid_config_path(self):
get_config('/f/a/k/e.config')

def test_get_config_with_valid_config_path_returns_config(self):
get_config('/f/a/k/e.config')
get_config(os.path.join(self.cwd, 'data', 'test-locust-swarm.cfg'))

# vim: filetype=python

0 comments on commit dec306a

Please sign in to comment.