Skip to content
Snippets Groups Projects
Commit af342e1f authored by inso's avatar inso
Browse files

Fix tests

parent 356dbe1a
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
current=`grep -P "__version_info__ = \(\'\d+\', \'\d+\', \'\d+(\w*)\'\)" src/sakia/__init__.py | grep -oP "\'\d+\', \'\d+\', \'\d+(\w*)\'"`
echo "Current version: $current"
if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+[0-9a-z]+$ ]]; then
if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+[0-9a-z]*$ ]]; then
IFS='.' read -r -a array <<< "$1"
sed -i "s/__version_info__\ = ($current)/__version_info__ = ('${array[0]}', '${array[1]}', '${array[2]}')/g" src/sakia/__init__.py
sed -i "s/#define MyAppVerStr .*/#define MyAppVerStr \"$1\"/g" ci/appveyor/sakia.iss
......
......@@ -126,6 +126,7 @@ class TestExplorerGraph(unittest.TestCase, QuamashTest):
def test_explore_full_from_center(self, app, community):
community.parameters = CoroutineMock(return_value = {'sigValidity': 1000})
community.network.confirmations = Mock(side_effect=lambda n: 4 if 996 else None)
community.nb_members = CoroutineMock(return_value = 3)
app.preferences = {'expert_mode': True}
explorer_graph = ExplorerGraph(app, community)
......@@ -143,6 +144,7 @@ class TestExplorerGraph(unittest.TestCase, QuamashTest):
def test_explore_full_from_extremity(self, app, community):
community.parameters = CoroutineMock(return_value = {'sigValidity': 1000})
community.network.confirmations = Mock(side_effect=lambda n: 4 if 996 else None)
community.nb_members = CoroutineMock(return_value = 3)
app.preferences = {'expert_mode': True}
explorer_graph = ExplorerGraph(app, community)
......@@ -160,6 +162,7 @@ class TestExplorerGraph(unittest.TestCase, QuamashTest):
def test_explore_partial(self, app, community):
community.parameters = CoroutineMock(return_value = {'sigValidity': 1000})
community.network.confirmations = Mock(side_effect=lambda n: 4 if 996 else None)
community.nb_members = CoroutineMock(return_value = 3)
app.preferences = {'expert_mode': True}
explorer_graph = ExplorerGraph(app, community)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment