Skip to content

Commit

Permalink
Fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kylegordon committed Oct 1, 2012
1 parent e7660c9 commit df37562
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions MockerTesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,38 @@

class MQTTRepublisherTestCase(MockerTestCase):

def test_instantiation(self):
"""
An MQTTRepublisher can be instantiated
"""
republisher = MQTTRepublisher("192.168.1.2")
self.assertEqual("192.168.1.2", republisher.host)

def test_instantiation_default_port(self):
"""
The port should default to 1883, the default port for Mosquitto.
"""
republisher = MQTTRepublisher("192.168.1.2")
self.assertEqual(1883, republisher.port)

def test_instantiation_set_the_port(self):
"""
It should be possible to define a custom port to connect to.
"""
republisher = MQTTRepublisher("192.168.1.2", port=1234)
self.assertEqual(1234, republisher.port)

def test_default_logfile(self):
"""
The logfile should default to /var/log/mqtt-republisher.log.
"""
republisher = MQTTRepublisher("192.168.1.2")
self.assertEqual("/var/log/mqtt-republisher.log", republisher.logfile)

def test_instantiation_set_the_logfile(self):
"""
It should be possible to define a logfile name.
"""
republisher = MQTTRepublisher("192.168.1.2", logfile="/tmp/logfile")
self.assertEqual("/tmp/logfile", republisher.logfile)
def test_instantiation(self):
"""
An MQTTRepublisher can be instantiated
"""
republisher = MQTTRepublisher("192.168.1.2")
self.assertEqual("192.168.1.2", republisher.host)

def test_instantiation_default_port(self):
"""
The port should default to 1883, the default port for Mosquitto.
"""
republisher = MQTTRepublisher("192.168.1.2")
self.assertEqual(1883, republisher.port)

def test_instantiation_set_the_port(self):
"""
It should be possible to define a custom port to connect to.
"""
republisher = MQTTRepublisher("192.168.1.2", port=1234)
self.assertEqual(1234, republisher.port)

def test_default_logfile(self):
"""
The logfile should default to /var/log/mqtt-republisher.log.
"""
republisher = MQTTRepublisher("192.168.1.2")
self.assertEqual("/var/log/mqtt-republisher.log", republisher.logfile)

def test_instantiation_set_the_logfile(self):
"""
It should be possible to define a logfile name.
"""
republisher = MQTTRepublisher("192.168.1.2", logfile="/tmp/logfile")
self.assertEqual("/tmp/logfile", republisher.logfile)

0 comments on commit df37562

Please sign in to comment.