Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
advornic committed Jul 30, 2015
1 parent 92004ab commit 05795a0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ else
$(PYTHON) test/server/$(TESTNAME) -v
endif

tests: clean test_neighbordb test_server test_client test_actions
tests: clean test_server test_client test_actions

python:
$(PYTHON) setup.py build
Expand Down
1 change: 0 additions & 1 deletion test/server/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,5 @@ def test_application_defaults(self, m_repository, m_load):
obj = ztpserver.app.start_wsgiapp()
self.assertIsInstance(obj, ztpserver.controller.Router)


if __name__ == '__main__':
unittest.main()
6 changes: 4 additions & 2 deletions test/server/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def test_nodes_resource_get_config(self):
self.match_routes(url, 'GET,PUT', 'POST,DELETE')



class MetaControllerUnitTests(unittest.TestCase):

@patch('ztpserver.controller.create_repository')
Expand Down Expand Up @@ -512,12 +513,13 @@ def test_get_action_missing(self, m_repository):

class NodesControllerUnitTests(unittest.TestCase):

def setUp(self):

def tearDown(self):
ztpserver.config.runtime.set_value(\
'disable_topology_validation', False, 'default')
ztpserver.config.runtime.set_value(\
'identifier', 'serialnumber', 'default')

@classmethod
def identifier(cls, node):
identifier = ztpserver.config.runtime.default.identifier
Expand Down
1 change: 0 additions & 1 deletion test/server/test_ndb.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ def node_fail(self):
debug(exc)



def get_test_list(filepath):
test_list = os.environ.get('TESTS', None)
if not test_list:
Expand Down
1 change: 1 addition & 0 deletions ztpserver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def load_config(conf=None):
conf = os.environ.get('ZTPS_CONFIG', conf)

if os.path.exists(conf):
log.info('Loading config file: %s' % conf)
config.runtime.read(conf)

def start_wsgiapp(config_file=None, debug=False):
Expand Down
4 changes: 2 additions & 2 deletions ztpserver/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def serialize(self, data):
return str(data)

#------------------------------------------------------------------------------
# Source: Michael Elsdörfer (https://gist.github.com/miracle2k))
# Source: Michael Elsdorfer (https://gist.github.com/miracle2k))
# https://gist.githubusercontent.com/miracle2k/
# 3184458/raw/ae89e23502f95c4555f0643dafae8a748e3fb382/
# odict.py
Expand Down Expand Up @@ -119,7 +119,7 @@ def represent_odict(dump_odict, tag, mapping, flow_style=None):
value: represent_odict(dumper,
u'tag:yaml.org,2002:map',
value))
#------------------------------------------------------------------------------
#--------------------------------------------------------------------------------

class YAMLSerializer(BaseSerializer):

Expand Down

0 comments on commit 05795a0

Please sign in to comment.