588
|
1 |
#============================================================================
|
|
2 |
#Name : test_atsant.py
|
|
3 |
#Part of : Helium
|
|
4 |
|
|
5 |
#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
6 |
#All rights reserved.
|
|
7 |
#This component and the accompanying materials are made available
|
|
8 |
#under the terms of the License "Eclipse Public License v1.0"
|
|
9 |
#which accompanies this distribution, and is available
|
|
10 |
#at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
11 |
#
|
|
12 |
#Initial Contributors:
|
|
13 |
#Nokia Corporation - initial contribution.
|
|
14 |
#
|
|
15 |
#Contributors:
|
|
16 |
#
|
|
17 |
#Description:
|
|
18 |
#===============================================================================
|
|
19 |
|
|
20 |
""" ats3 custom.py module tests. """
|
|
21 |
|
|
22 |
import tempfile
|
|
23 |
import os
|
|
24 |
|
|
25 |
class Bunch(object):
|
|
26 |
""" Configuration object. Argument from constructor are converted into class attributes. """
|
|
27 |
def __init__(self, **kwargs):
|
|
28 |
self.__dict__.update(kwargs)
|
|
29 |
|
|
30 |
def test_atscustom():
|
|
31 |
import ats3
|
|
32 |
import ats3.custom
|
|
33 |
output = os.path.join(tempfile.mkdtemp(), 'ATS3Drop.zip')
|
|
34 |
opts = Bunch(file_store='', flash_images='', diamonds_build_url='', testrun_name='', device_type='', report_email='', test_timeout='', drop_file=output, config_file='')
|
|
35 |
config = ats3.Configuration(opts, [])
|
|
36 |
ats3.custom.create_drop(config)
|
|
37 |
assert os.path.exists(output)
|