Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: packages/infra_libs/infra_libs/event_mon/test/config_test.py

Issue 2179853002: Added packages/infra_libs as the first Python package. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Final rebase (no actual changes) Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import argparse 5 import argparse
6 import os 6 import os
7 import traceback 7 import traceback
8 import unittest 8 import unittest
9 9
10 import mock 10 import mock
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 self.assertEqual(orig_event, event_mon.get_default_event()) 135 self.assertEqual(orig_event, event_mon.get_default_event())
136 self.assertIsNot(orig_event, event_mon.get_default_event()) 136 self.assertIsNot(orig_event, event_mon.get_default_event())
137 137
138 def test_run_type_test(self): 138 def test_run_type_test(self):
139 event_mon.setup_monitoring(run_type='test', service_account_creds='creds') 139 event_mon.setup_monitoring(run_type='test', service_account_creds='creds')
140 self.assertEquals(config._cache['service_account_creds'], 'creds') 140 self.assertEquals(config._cache['service_account_creds'], 'creds')
141 141
142 def test_run_type_invalid(self): 142 def test_run_type_invalid(self):
143 event_mon.setup_monitoring(run_type='invalid.') 143 event_mon.setup_monitoring(run_type='invalid.')
144 self.assertFalse(isinstance(config._router, router._HttpRouter)) 144 self.assertFalse(isinstance(config._router, router._HttpRouter))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698