Esempio n. 1
0
class TestMockOpenTSDBBackend(TestCase):
    def setUp(self):

        self.backend = MockOpenTSDBBackend()

    def test_messages(self):

        msg = "version\n"
        response = self.backend.handle(msg)

        self.assertEqual(response, "%s\n" % opentsdbproxy.__version__)

        msg = "put test.my.value 1366155625 42 host=bandersnatch.phys.uvic.ca password=pencil user=joshua\n"
        response = self.backend.handle(msg)

        self.assertIsNone(response)
        self.assertIn(msg, self.backend.messages)
class TestMockOpenTSDBBackend(TestCase):
    def setUp(self):

        self.backend = MockOpenTSDBBackend()

    def test_messages(self):

        msg = "version\n"
        response = self.backend.handle(msg)

        self.assertEqual(response, "%s\n" % opentsdbproxy.__version__)

        msg = "put test.my.value 1366155625 42 host=bandersnatch.phys.uvic.ca password=pencil user=joshua\n"
        response = self.backend.handle(msg)

        self.assertIsNone(response)
        self.assertIn(msg, self.backend.messages)
Esempio n. 3
0
    def setUp(self):

        self.backend = MockOpenTSDBBackend()
    def setUp(self):

        self.backend = MockOpenTSDBBackend()