blob: 99b96950cd0aada776c709442f9f7408cee8f917 [file] [log] [blame]
Mustafa Emre Acerac34055c2018-03-08 22:07:441#!/usr/bin/env python
2# Copyright 2018 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6import unittest
7import os
8import sys
9
10here = os.path.realpath(__file__)
11testdata_path = os.path.normpath(os.path.join(here, '..', 'testdata'))
12
13import upload_screenshots
14
15
16class UploadTests(unittest.TestCase):
17
18 def test_find_screenshots(self):
19 screenshots = upload_screenshots.find_screenshots(
20 testdata_path,
21 os.path.join(testdata_path, 'translation_expectations.pyl'))
Mustafa Emre Acera4181d42018-03-22 17:45:1722 self.assertEquals(2, len(screenshots))
Mustafa Emre Acerac34055c2018-03-08 22:07:4423 self.assertEquals(
24 os.path.join(testdata_path, 'test_grd', 'IDS_TEST_STRING1.png'),
25 screenshots[0])
Mustafa Emre Acera4181d42018-03-22 17:45:1726 self.assertEquals(
27 os.path.join(testdata_path, 'part_grdp', 'IDS_PART_STRING2.png'),
28 screenshots[1])
Mustafa Emre Acerac34055c2018-03-08 22:07:4429
30
31if __name__ == '__main__':
32 unittest.main()