Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
358da254
Commit
358da254
authored
Jan 13, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move mock.py to neo/tests to not conflict with
https://pypi.python.org/pypi/mock
parent
3e5299cb
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
21 additions
and
21 deletions
+21
-21
.gitignore
.gitignore
+1
-1
neo/tests/__init__.py
neo/tests/__init__.py
+1
-1
neo/tests/client/testClientApp.py
neo/tests/client/testClientApp.py
+1
-1
neo/tests/client/testConnectionPool.py
neo/tests/client/testConnectionPool.py
+1
-1
neo/tests/client/testMasterHandler.py
neo/tests/client/testMasterHandler.py
+1
-1
neo/tests/master/testClientHandler.py
neo/tests/master/testClientHandler.py
+1
-1
neo/tests/master/testElectionHandler.py
neo/tests/master/testElectionHandler.py
+1
-1
neo/tests/master/testStorageHandler.py
neo/tests/master/testStorageHandler.py
+1
-1
neo/tests/master/testTransactions.py
neo/tests/master/testTransactions.py
+1
-1
neo/tests/storage/testClientHandler.py
neo/tests/storage/testClientHandler.py
+1
-1
neo/tests/storage/testMasterHandler.py
neo/tests/storage/testMasterHandler.py
+1
-1
neo/tests/storage/testStorageApp.py
neo/tests/storage/testStorageApp.py
+1
-1
neo/tests/storage/testStorageMySQL.py
neo/tests/storage/testStorageMySQL.py
+1
-1
neo/tests/storage/testTransactions.py
neo/tests/storage/testTransactions.py
+1
-1
neo/tests/testConnection.py
neo/tests/testConnection.py
+1
-1
neo/tests/testHandler.py
neo/tests/testHandler.py
+1
-1
neo/tests/testNodes.py
neo/tests/testNodes.py
+1
-1
neo/tests/threaded/__init__.py
neo/tests/threaded/__init__.py
+1
-1
setup.py
setup.py
+3
-3
No files found.
.gitignore
View file @
358da254
...
@@ -6,5 +6,5 @@
...
@@ -6,5 +6,5 @@
/build/
/build/
/dist/
/dist/
/htmlcov/
/htmlcov/
/mock.py
/
neo/tests/
mock.py
/neoppod.egg-info/
/neoppod.egg-info/
neo/tests/__init__.py
View file @
358da254
...
@@ -29,7 +29,7 @@ import MySQLdb
...
@@ -29,7 +29,7 @@ import MySQLdb
import
transaction
import
transaction
from
functools
import
wraps
from
functools
import
wraps
from
mock
import
Mock
from
.
mock
import
Mock
from
neo.lib
import
debug
,
logging
,
protocol
from
neo.lib
import
debug
,
logging
,
protocol
from
neo.lib.protocol
import
NodeTypes
,
Packets
,
UUID_NAMESPACES
from
neo.lib.protocol
import
NodeTypes
,
Packets
,
UUID_NAMESPACES
from
neo.lib.util
import
cached_property
from
neo.lib.util
import
cached_property
...
...
neo/tests/client/testClientApp.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
from
..
mock
import
Mock
from
ZODB.POSException
import
StorageTransactionError
,
ConflictError
from
ZODB.POSException
import
StorageTransactionError
,
ConflictError
from
..
import
NeoUnitTestBase
,
buildUrlFromString
from
..
import
NeoUnitTestBase
,
buildUrlFromString
from
neo.client.app
import
Application
from
neo.client.app
import
Application
...
...
neo/tests/client/testConnectionPool.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
time
,
unittest
import
time
,
unittest
from
mock
import
Mock
from
..
mock
import
Mock
from
..
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.client.app
import
ConnectionPool
from
neo.client.app
import
ConnectionPool
...
...
neo/tests/client/testMasterHandler.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
from
..
mock
import
Mock
from
..
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.client.handlers.master
import
PrimaryAnswersHandler
from
neo.client.handlers.master
import
PrimaryAnswersHandler
from
neo.client.exception
import
NEOStorageError
from
neo.client.exception
import
NEOStorageError
...
...
neo/tests/master/testClientHandler.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
from
..
mock
import
Mock
from
..
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.util
import
p64
from
neo.lib.util
import
p64
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
Packets
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
Packets
...
...
neo/tests/master/testElectionHandler.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
from
..
mock
import
Mock
from
neo.lib
import
protocol
from
neo.lib
import
protocol
from
..
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
Packets
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
Packets
...
...
neo/tests/master/testStorageHandler.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
from
..
mock
import
Mock
from
..
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
Packets
from
neo.lib.protocol
import
NodeTypes
,
Packets
from
neo.master.handlers.storage
import
StorageServiceHandler
from
neo.master.handlers.storage
import
StorageServiceHandler
...
...
neo/tests/master/testTransactions.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
from
..
mock
import
Mock
from
struct
import
pack
from
struct
import
pack
from
..
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
from
neo.lib.protocol
import
NodeTypes
...
...
neo/tests/storage/testClientHandler.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
,
ReturnValues
from
..
mock
import
Mock
,
ReturnValues
from
..
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.storage.app
import
Application
from
neo.storage.app
import
Application
from
neo.storage.handlers.client
import
ClientOperationHandler
from
neo.storage.handlers.client
import
ClientOperationHandler
...
...
neo/tests/storage/testMasterHandler.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
from
..
mock
import
Mock
from
collections
import
deque
from
collections
import
deque
from
..
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.storage.app
import
Application
from
neo.storage.app
import
Application
...
...
neo/tests/storage/testStorageApp.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
from
..
mock
import
Mock
from
..
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.storage.app
import
Application
from
neo.storage.app
import
Application
from
neo.lib.protocol
import
CellStates
from
neo.lib.protocol
import
CellStates
...
...
neo/tests/storage/testStorageMySQL.py
View file @
358da254
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
import
unittest
import
unittest
from
MySQLdb
import
OperationalError
from
MySQLdb
import
OperationalError
from
mock
import
Mock
from
..
mock
import
Mock
from
neo.lib.exception
import
DatabaseFailure
from
neo.lib.exception
import
DatabaseFailure
from
neo.lib.util
import
p64
from
neo.lib.util
import
p64
from
..
import
DB_PREFIX
,
DB_SOCKET
,
DB_USER
from
..
import
DB_PREFIX
,
DB_SOCKET
,
DB_USER
...
...
neo/tests/storage/testTransactions.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
from
..
mock
import
Mock
from
..
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.util
import
p64
from
neo.lib.util
import
p64
from
neo.storage.transactions
import
TransactionManager
from
neo.storage.transactions
import
TransactionManager
...
...
neo/tests/testConnection.py
View file @
358da254
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
time
import
time
from
time
import
time
from
mock
import
Mock
from
.
mock
import
Mock
from
neo.lib
import
connection
,
logging
from
neo.lib
import
connection
,
logging
from
neo.lib.connection
import
BaseConnection
,
ClientConnection
,
\
from
neo.lib.connection
import
BaseConnection
,
ClientConnection
,
\
MTClientConnection
,
CRITICAL_TIMEOUT
MTClientConnection
,
CRITICAL_TIMEOUT
...
...
neo/tests/testHandler.py
View file @
358da254
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
mock
import
Mock
from
.
mock
import
Mock
from
.
import
NeoUnitTestBase
from
.
import
NeoUnitTestBase
from
neo.lib.handler
import
EventHandler
from
neo.lib.handler
import
EventHandler
from
neo.lib.protocol
import
PacketMalformedError
,
UnexpectedPacketError
,
\
from
neo.lib.protocol
import
PacketMalformedError
,
UnexpectedPacketError
,
\
...
...
neo/tests/testNodes.py
View file @
358da254
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
import
shutil
import
shutil
import
unittest
import
unittest
from
mock
import
Mock
from
.
mock
import
Mock
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
from
neo.lib.node
import
Node
,
MasterDB
from
neo.lib.node
import
Node
,
MasterDB
from
.
import
NeoUnitTestBase
,
getTempDirectory
from
.
import
NeoUnitTestBase
,
getTempDirectory
...
...
neo/tests/threaded/__init__.py
View file @
358da254
...
@@ -25,7 +25,7 @@ from itertools import count
...
@@ -25,7 +25,7 @@ from itertools import count
from
functools
import
partial
,
wraps
from
functools
import
partial
,
wraps
from
thread
import
get_ident
from
thread
import
get_ident
from
zlib
import
decompress
from
zlib
import
decompress
from
mock
import
Mock
from
..
mock
import
Mock
import
transaction
,
ZODB
import
transaction
,
ZODB
import
neo.admin.app
,
neo
.
master
.
app
,
neo
.
storage
.
app
import
neo.admin.app
,
neo
.
master
.
app
,
neo
.
storage
.
app
import
neo.client.app
,
neo
.
neoctl
.
app
import
neo.client.app
,
neo
.
neoctl
.
app
...
...
setup.py
View file @
358da254
...
@@ -14,7 +14,8 @@ Topic :: Database
...
@@ -14,7 +14,8 @@ Topic :: Database
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Software Development :: Libraries :: Python Modules
"""
"""
if
not
os
.
path
.
exists
(
'mock.py'
):
mock
=
'neo/tests/mock.py'
if
not
os
.
path
.
exists
(
mock
):
import
cStringIO
,
hashlib
,
subprocess
,
urllib
,
zipfile
import
cStringIO
,
hashlib
,
subprocess
,
urllib
,
zipfile
x
=
'pythonmock-0.1.0.zip'
x
=
'pythonmock-0.1.0.zip'
try
:
try
:
...
@@ -25,7 +26,7 @@ if not os.path.exists('mock.py'):
...
@@ -25,7 +26,7 @@ if not os.path.exists('mock.py'):
mock_py
=
zipfile
.
ZipFile
(
cStringIO
.
StringIO
(
x
)).
read
(
'mock.py'
)
mock_py
=
zipfile
.
ZipFile
(
cStringIO
.
StringIO
(
x
)).
read
(
'mock.py'
)
if
hashlib
.
md5
(
mock_py
).
hexdigest
()
!=
'79f42f390678e5195d9ce4ae43bd18ec'
:
if
hashlib
.
md5
(
mock_py
).
hexdigest
()
!=
'79f42f390678e5195d9ce4ae43bd18ec'
:
raise
EnvironmentError
(
"MD5 checksum mismatch downloading 'mock.py'"
)
raise
EnvironmentError
(
"MD5 checksum mismatch downloading 'mock.py'"
)
open
(
'mock.py'
,
'w'
).
write
(
mock_py
)
open
(
mock
,
'w'
).
write
(
mock_py
)
zodb_require
=
[
'ZODB3>=3.10dev'
]
zodb_require
=
[
'ZODB3>=3.10dev'
]
...
@@ -69,7 +70,6 @@ setup(
...
@@ -69,7 +70,6 @@ setup(
long_description
=
".. contents::
\
n
\
n
"
+
open
(
'README.rst'
).
read
()
long_description
=
".. contents::
\
n
\
n
"
+
open
(
'README.rst'
).
read
()
+
"
\
n
"
+
open
(
'CHANGELOG.rst'
).
read
(),
+
"
\
n
"
+
open
(
'CHANGELOG.rst'
).
read
(),
packages
=
find_packages
(),
packages
=
find_packages
(),
py_modules
=
[
'mock'
],
entry_points
=
{
entry_points
=
{
'console_scripts'
:
[
'console_scripts'
:
[
# XXX: we'd like not to generate scripts for unwanted features
# XXX: we'd like not to generate scripts for unwanted features
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment