Add kivy mock network and update setup file
This commit is contained in:
parent
12de1fc3f0
commit
71a390b578
|
@ -2,4 +2,6 @@
|
|||
|
||||
pip3 install -r kivy-requirements.txt
|
||||
|
||||
export INSTALL_TESTS=True
|
||||
|
||||
pip3 install .
|
||||
|
|
3
setup.py
3
setup.py
|
@ -78,6 +78,9 @@ if __name__ == "__main__":
|
|||
if sys.version_info[0] == 3:
|
||||
packages.extend(['pybitmessage.bitmessagekivy', 'pybitmessage.bitmessagekivy.baseclass'])
|
||||
|
||||
if os.environ.get('INSTALL_TESTS', False):
|
||||
packages.append('pybitmessage.mock')
|
||||
|
||||
# this will silently accept alternative providers of msgpack
|
||||
# if they are already installed
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ from pybitmessage.bitmessagekivy.mpybit import NavigateApp
|
|||
|
||||
import multiqueue
|
||||
from class_addressGenerator import FakeAddressGenerator
|
||||
from pybitmessage.mock.network import stats, objectracker
|
||||
|
||||
|
||||
def main():
|
||||
|
|
18
src/mock/network.py
Normal file
18
src/mock/network.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# pylint: disable=too-few-public-methods
|
||||
|
||||
"""
|
||||
Mock Network
|
||||
"""
|
||||
|
||||
|
||||
class objectracker(object):
|
||||
"""Mock object tracker"""
|
||||
missingObjects = {}
|
||||
|
||||
|
||||
class stats(object):
|
||||
"""Mock network statics"""
|
||||
@staticmethod
|
||||
def connectedHostsList():
|
||||
"""List of all the connected hosts"""
|
||||
return ()
|
Reference in New Issue
Block a user