~wesmason/conn-check/snmp

« back to all changes in this revision

Viewing changes to tests.py

  • Committer: Wes Mason
  • Date: 2014-10-18 08:43:21 UTC
  • Revision ID: wesley.mason@canonical.com-20141018084321-96jr32m2ij3v0kig
Fix snmp test to confirm to newer prefix

Show diffs side-by-side

added added

removed removed

Lines of Context:
216
216
    def test_make_snmp_check(self):
217
217
        result = make_snmp_check('localhost', 8080, 'foo', 'v2', ['bar', 'baz'])
218
218
        self.assertIsInstance(result, PrefixCheckWrapper)
219
 
        self.assertEqual(result.prefix, 'snmp.')
 
219
        self.assertEqual(result.prefix, 'snmp:')
220
220
        wrapped = result.wrapped
221
221
        self.assertIsInstance(wrapped, MultiCheck)
222
222
        self.assertIs(wrapped.strategy, sequential_strategy)
223
223
        self.assertEqual(len(wrapped.subchecks), 2)
224
224
        self.assertThat(wrapped.subchecks[0],
225
 
                FunctionCheckMatcher('tcp.localhost:8080', 'localhost:8080'))
 
225
                FunctionCheckMatcher('tcp:localhost:8080', 'localhost:8080'))
226
226
        self.assertThat(wrapped.subchecks[1], FunctionCheckMatcher('get', None))
227
227
 
228
228
    def test_check_from_description_unknown_type(self):