OLD | NEW |
1 #!/usr/bin/env python | |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 3 # found in the LICENSE file. |
5 | 4 |
6 """Integration tests for bug hunter.""" | 5 """Integration tests for bug hunter.""" |
7 | 6 |
8 import csv | 7 import csv |
9 from optparse import Values | 8 from optparse import Values |
10 import os | 9 import os |
11 import unittest | 10 import unittest |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 bh.WriteIssuesToFileInCSV(self._GetIssue(), self._TEST_FILENAME) | 87 bh.WriteIssuesToFileInCSV(self._GetIssue(), self._TEST_FILENAME) |
89 | 88 |
90 with open(self._TEST_FILENAME, 'r') as f: | 89 with open(self._TEST_FILENAME, 'r') as f: |
91 reader = csv.reader(f) | 90 reader = csv.reader(f) |
92 self.assertEquals(reader.next(), ['status', 'content', 'state', | 91 self.assertEquals(reader.next(), ['status', 'content', 'state', |
93 'issue_id', 'urls', 'title', 'labels', | 92 'issue_id', 'urls', 'title', 'labels', |
94 'author', 'comments']) | 93 'author', 'comments']) |
95 self.assertEquals(reader.next(), ['status', 'content', 'state', '0', | 94 self.assertEquals(reader.next(), ['status', 'content', 'state', '0', |
96 '[]', 'title', '[]', 'author', '[]']) | 95 '[]', 'title', '[]', 'author', '[]']) |
97 self.assertRaises(StopIteration, reader.next) | 96 self.assertRaises(StopIteration, reader.next) |
OLD | NEW |