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

Side by Side Diff: chrome/common/extensions/docs/server2/availability_finder_test.py

Issue 18323018: Linking AvailabilityFinder with APIDataSource and intro-table templates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase with master Created 7 years, 5 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import sys 7 import sys
8 import unittest 8 import unittest
9 9
10 from availability_finder import AvailabilityFinder 10 from availability_finder import AvailabilityFinder
(...skipping 30 matching lines...) Expand all
41 # availability is being checked. 41 # availability is being checked.
42 42
43 # Testing the predetermined APIs found in 43 # Testing the predetermined APIs found in
44 # templates/json/api_availabilities.json. 44 # templates/json/api_availabilities.json.
45 self.assertEqual('stable', 45 self.assertEqual('stable',
46 self._avail_finder.GetApiAvailability('jsonAPI1').channel) 46 self._avail_finder.GetApiAvailability('jsonAPI1').channel)
47 self.assertEqual(10, 47 self.assertEqual(10,
48 self._avail_finder.GetApiAvailability('jsonAPI1').version) 48 self._avail_finder.GetApiAvailability('jsonAPI1').version)
49 self.assertEqual('trunk', 49 self.assertEqual('trunk',
50 self._avail_finder.GetApiAvailability('jsonAPI2').channel) 50 self._avail_finder.GetApiAvailability('jsonAPI2').channel)
51 self.assertEqual(None, 51 self.assertEqual('trunk',
52 self._avail_finder.GetApiAvailability('jsonAPI2').version) 52 self._avail_finder.GetApiAvailability('jsonAPI2').version)
53 self.assertEqual('dev', 53 self.assertEqual('dev',
54 self._avail_finder.GetApiAvailability('jsonAPI3').channel) 54 self._avail_finder.GetApiAvailability('jsonAPI3').channel)
55 self.assertEqual(None, 55 self.assertEqual(28,
56 self._avail_finder.GetApiAvailability('jsonAPI3').version) 56 self._avail_finder.GetApiAvailability('jsonAPI3').version)
57 57
58 # Testing APIs found only by checking file system existence. 58 # Testing APIs found only by checking file system existence.
59 self.assertEquals('stable', 59 self.assertEquals('stable',
60 self._avail_finder.GetApiAvailability('windows').channel) 60 self._avail_finder.GetApiAvailability('windows').channel)
61 self.assertEquals(23, 61 self.assertEquals(23,
62 self._avail_finder.GetApiAvailability('windows').version) 62 self._avail_finder.GetApiAvailability('windows').version)
63 self.assertEquals('stable', 63 self.assertEquals('stable',
64 self._avail_finder.GetApiAvailability('tabs').channel) 64 self._avail_finder.GetApiAvailability('tabs').channel)
65 self.assertEquals(18, 65 self.assertEquals(18,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 self.assertEquals(28, 172 self.assertEquals(28,
173 self._avail_finder.GetApiAvailability('notifications').version) 173 self._avail_finder.GetApiAvailability('notifications').version)
174 # Listed as 'beta' on |stable|, 'dev' on |beta| ... until |stable| on trunk. 174 # Listed as 'beta' on |stable|, 'dev' on |beta| ... until |stable| on trunk.
175 self.assertEquals('trunk', 175 self.assertEquals('trunk',
176 self._avail_finder.GetApiAvailability('events').channel) 176 self._avail_finder.GetApiAvailability('events').channel)
177 self.assertEquals('trunk', 177 self.assertEquals('trunk',
178 self._avail_finder.GetApiAvailability('events').version) 178 self._avail_finder.GetApiAvailability('events').version)
179 179
180 if __name__ == '__main__': 180 if __name__ == '__main__':
181 unittest.main() 181 unittest.main()
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/availability_finder.py ('k') | chrome/common/extensions/docs/server2/cron.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698