def test_json_receiver_already_running(): socket_path = tempfile.mktemp() fp = open(socket_path + '.lck', 'a+') fcntl.flock(fp, fcntl.LOCK_EX | fcntl.LOCK_NB) receiver = JSONReceiver(socket_path) receiver.start()
def test_json_receiver_missing_directory(): receiver = JSONReceiver('/some/missing/directory') receiver.start()
def test_json_receiver_permission_denied(): receiver = JSONReceiver('/socket') receiver.start()