From 5d56162300ed6359c8f44b5a16687a3496a88f21 Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Fri, 3 Apr 2015 22:04:45 +0500 Subject: [PATCH] Quick little base test for connection --- minecraft/networking/connection.py | 3 +-- tests/test_connection.py | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 tests/test_connection.py diff --git a/minecraft/networking/connection.py b/minecraft/networking/connection.py index 7f0e1af..9ef6a54 100644 --- a/minecraft/networking/connection.py +++ b/minecraft/networking/connection.py @@ -6,10 +6,9 @@ import socket import time import select -import encryption - from .types import VarInt from . import packets +from . import encryption from .. import PROTOCOL_VERSION diff --git a/tests/test_connection.py b/tests/test_connection.py new file mode 100644 index 0000000..fcd345a --- /dev/null +++ b/tests/test_connection.py @@ -0,0 +1,9 @@ +import unittest +import minecraft.networking.connection as conn + + +class ConnectionTest(unittest.TestCase): + + def test_connection(self): + connection = conn.Connection("localhost", 25565, None) + self.assertFalse(connection.options.compression_enabled)