Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(20)  |  Call(16)  |  Derive(0)  |  Import(4)

src/s/i/simpleRaft-HEAD/simpleRaft/tests/test_MemoryBoard.py   simpleRaft(Download)
import unittest
 
from ..boards.memory_board import MemoryBoard
from ..messages.base import BaseMessage
 
class TestMemoryBoard( unittest.TestCase ):
 
	def setUp( self ):
		self.board = MemoryBoard()

src/s/i/simpleRaft-HEAD/simpleRaft/tests/test_LeaderServer.py   simpleRaft(Download)
import unittest
 
from ..boards.memory_board import MemoryBoard
from ..messages.append_entries import AppendEntriesMessage
from ..messages.request_vote import RequestVoteMessage
	def setUp( self ):
 
		followers = []
		for i in range( 1, 4 ):
			board = MemoryBoard()
			state = Follower()
			followers.append( Server( i, state, [], board, [] ) )
 
		board = MemoryBoard()

src/s/i/simpleRaft-HEAD/simpleRaft/tests/test_FollowerServer.py   simpleRaft(Download)
import unittest
 
from ..boards.memory_board import MemoryBoard
from ..messages.append_entries import AppendEntriesMessage
from ..messages.request_vote import RequestVoteMessage
	def setUp( self ):
		board = MemoryBoard()
		state = Follower()
		self.oserver = Server( 0, state, [], board, [] )
 
		board = MemoryBoard()

src/s/i/simpleRaft-HEAD/simpleRaft/tests/test_CandidateServer.py   simpleRaft(Download)
import unittest
 
from ..boards.memory_board import MemoryBoard
from ..messages.append_entries import AppendEntriesMessage
from ..messages.request_vote import RequestVoteMessage
	def setUp( self ):
		board = MemoryBoard()
		state = Follower()
		self.oserver = Server( 0, state, [], board, [] )
 
		board = MemoryBoard()
	def test_candidate_server_wins_election( self ):
		board = MemoryBoard()
		state = Follower()
		server0 = Server( 0, state, [], board, [] )
 
		board = MemoryBoard()