From af342e1f345bc1098f53e7b05fcbbb017319d8ef Mon Sep 17 00:00:00 2001
From: inso <insomniak.fr@gmaiL.com>
Date: Tue, 7 Jun 2016 08:38:54 +0200
Subject: [PATCH] Fix tests

---
 release.sh                                             | 2 +-
 src/sakia/tests/unit/core/graph/test_explorer_graph.py | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/release.sh b/release.sh
index 82baa935..e8be965b 100755
--- a/release.sh
+++ b/release.sh
@@ -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
diff --git a/src/sakia/tests/unit/core/graph/test_explorer_graph.py b/src/sakia/tests/unit/core/graph/test_explorer_graph.py
index e4a4e1e0..e3c99600 100644
--- a/src/sakia/tests/unit/core/graph/test_explorer_graph.py
+++ b/src/sakia/tests/unit/core/graph/test_explorer_graph.py
@@ -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)
-- 
GitLab