OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Integration tests for bug hunter.""" | 6 """Integration tests for bug hunter.""" |
7 | 7 |
8 import csv | 8 import csv |
9 from optparse import Values | 9 from optparse import Values |
10 import os | 10 import os |
11 import unittest | 11 import unittest |
12 | 12 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 bh.WriteIssuesToFileInCSV(self._GetIssue(), self._TEST_FILENAME) | 88 bh.WriteIssuesToFileInCSV(self._GetIssue(), self._TEST_FILENAME) |
89 | 89 |
90 with open(self._TEST_FILENAME, 'r') as f: | 90 with open(self._TEST_FILENAME, 'r') as f: |
91 reader = csv.reader(f) | 91 reader = csv.reader(f) |
92 self.assertEquals(reader.next(), ['status', 'content', 'state', | 92 self.assertEquals(reader.next(), ['status', 'content', 'state', |
93 'issue_id', 'urls', 'title', 'labels', | 93 'issue_id', 'urls', 'title', 'labels', |
94 'author', 'comments']) | 94 'author', 'comments']) |
95 self.assertEquals(reader.next(), ['status', 'content', 'state', '0', | 95 self.assertEquals(reader.next(), ['status', 'content', 'state', '0', |
96 '[]', 'title', '[]', 'author', '[]']) | 96 '[]', 'title', '[]', 'author', '[]']) |
97 self.assertRaises(StopIteration, reader.next) | 97 self.assertRaises(StopIteration, reader.next) |
OLD | NEW |