Beispiel #1
0
    def test__validate__missing_port__raises__ConnectionAttributeNotSetError(
            self):
        c = Connection(name="default", host="localhost")

        with self.assertRaises(ConnectionAttributeNotSetError):
            c.validate()
Beispiel #2
0
    def test__socket_property(self):
        c = Connection(name="default", host="localhost", port=27017)

        self.assertEqual(c.socket, "localhost:27017")
Beispiel #3
0
    def test__validate(self):
        c = Connection(name="default", host="localhost", port=27017)

        self.assertTrue(c.validate())