Skip to content

Commit

Permalink
fixing dependencies
Browse files Browse the repository at this point in the history
Updating dependencies caused some xml to fail.
Needed to change commit to commit-configuration because of:
ncclient/ncclient#239
  • Loading branch information
Stephane Robert committed Aug 17, 2018
1 parent e7d769d commit 7f5083f
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 5 deletions.
23 changes: 23 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --no-index --no-emit-trusted-host --output-file constraints.txt requirements.txt
#
-e git+https://github.com/stephanerobert/tftpy.git@master#egg=tftpy
appdirs==1.4.3 # via twisted
asn1crypto==0.24.0 # via cryptography
cffi==1.11.5 # via cryptography
constantly==15.1.0 # via twisted
cryptography==2.3.1 # via twisted
enum34==1.1.6 # via cryptography
idna==2.7 # via cryptography
incremental==17.5.0 # via twisted
ipaddress==1.0.22 # via cryptography
lxml==4.2.4
netaddr==0.7.19
pyasn1==0.4.4 # via twisted
pycparser==2.18 # via cffi
six==1.11.0 # via cryptography
twisted[conch]==16.6.0
zope.interface==4.5.0 # via twisted
2 changes: 1 addition & 1 deletion fake_switches/netconf/capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def edit_config(self, request):

return Response(etree.Element("ok"))

def commit(self, _):
def commit_configuration(self, _):
self.datastore.commit_candidate()
self.datastore.configurations.get('candidate').commit()
return Response(etree.Element("ok"))
Expand Down
35 changes: 35 additions & 0 deletions test-constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --no-index --no-emit-trusted-host --output-file test-constraints.txt test-requirements.txt constraints.txt
#
-e git+https://github.com/stephanerobert/tftpy.git@master#egg=tftpy
appdirs==1.4.3
asn1crypto==0.24.0
bcrypt==3.1.4 # via paramiko
cffi==1.11.5
constantly==15.1.0
cryptography==2.3.1
enum34==1.1.6
flexmock==0.10.2
funcsigs==1.0.2 # via mock
idna==2.7
incremental==17.5.0
ipaddress==1.0.22
lxml==4.2.4
mock==2.0.0
ncclient==0.6.0
netaddr==0.7.19
nose==1.3.7
paramiko==2.4.1 # via ncclient
pbr==4.2.0 # via mock
pexpect==4.6.0
ptyprocess==0.6.0 # via pexpect
pyasn1==0.4.4
pycparser==2.18
pyhamcrest==1.9.0
pynacl==1.2.1 # via paramiko
six==1.11.0
twisted[conch]==16.6.0
zope.interface==4.5.0
11 changes: 8 additions & 3 deletions tests/netconf/netconf_protocol_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
import sys
import unittest

from fake_switches.netconf import RUNNING, dict_2_etree
from fake_switches.netconf.capabilities import filter_content
from fake_switches.netconf.netconf_protocol import NetconfProtocol
from hamcrest import assert_that, ends_with, equal_to, has_length, has_key
from hamcrest.core.base_matcher import BaseMatcher
from lxml import etree
from lxml.etree import _Element
from mock import Mock
from ncclient import xml_
from ncclient.xml_ import to_ele, to_xml

from fake_switches.netconf import RUNNING, dict_2_etree
from fake_switches.netconf.capabilities import filter_content
from fake_switches.netconf.netconf_protocol import NetconfProtocol

xml_.parser = etree.XMLParser(recover=True)


class NetconfProtocolTest(unittest.TestCase):
def setUp(self):
Expand Down
13 changes: 12 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,15 @@ deps =

commands = python setup.py nosetests

install_command=pip install --process-dependency-links {opts} {packages}
install_command =
pip install -c {toxinidir}/test-constraints.txt {opts} {packages}

[testenv:bump-dependencies]
skipsdist = True
skip_install = true
install_command = pip install {opts} {packages}
-deps = pip-tools==2.0.2
commands =
pip-compile --upgrade --no-index --no-emit-trusted-host --output-file constraints.txt requirements.txt
pip-compile --upgrade --no-index --no-emit-trusted-host --output-file test-constraints.txt test-requirements.txt constraints.txt

0 comments on commit 7f5083f

Please sign in to comment.