astro.test.services package

Submodules

astro.test.services.DataServerPerformanceTest module

Performace test for the data server

Use the DPU to start jobs on the cluster which request (un)zipped fiels from the data server

Example : >awe DataServerPerformance_test.py

astro.test.services.DataServerPerformanceTest.getEnv()

get a environment structure overriding the defaults

astro.test.services.DataServerPerformanceTest.make_dpu_info(jobs)

given the jobs make a description for the dpu

class astro.test.services.DataServerPerformanceTest.testPerformanceDataServer(methodName='runTest')

Bases: unittest.case.TestCase

get_frames()

make a list of frames

setUp()
tearDown()
test_dataserver()

start testing

astro.test.services.DependencyCutout_test module

class astro.test.services.DependencyCutout_test.testDependencyCutout(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

initialize

tearDown()

clean up

astro.test.services.HtmlCalibrationEdit_test module

test cases for HtmlCalibrationEdit

astro.test.services.HtmlCalibrationEdit_test.get_extra_testsets()

return extra test sets

astro.test.services.HtmlCalibrationEdit_test.get_random_object(obj_type)

get a random object

class astro.test.services.HtmlCalibrationEdit_test.testHtmlCalibrationEdit(*args, **kwargs)

Bases: common.test.services.WebServerBaseTest.WebServerBaseTest

cases = ['AssociateList', 'DomeFlatFrame', 'RawBiasFrame', 'RawFitsData']
get_default_filename()

return the default server filename

get_default_server()

return the default server address

get_testset(case)

(derived) returns the test test defined by the argument test

get_testset_for_class(class_str)

return the test set for a class string

get_testset_for_dict(count, args)

return test set for an arg dictionary

html_gen_class

alias of astro.services.calts.HtmlCalibrationQuality.HtmlCalibrationQuality

astro.test.services.HtmlCalibrationGraph_test module

Module with test cases for HtmlCalibrationGraph

class astro.test.services.HtmlCalibrationGraph_test.testHtmlCalibrationGraph(*args, **kwargs)

Bases: common.test.services.WebServerBaseTest.WebServerBaseTest

cases = [(0, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'ReadNoise', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (1, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'HotPixelMap', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (2, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'GainLinearity', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (3, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'ColdPixelMap', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (4, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'BiasFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (5, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'DomeFlatFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (6, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'TwilightFlatFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (7, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'NightSkyFlatFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (8, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'FringeFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (9, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'MasterFlatFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (10, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'IlluminationCorrectionFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (11, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'IlluminationCorrection', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (12, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'PhotometricParameters', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (13, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'PhotTransformation', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (14, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'RawBiasFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (15, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'RawDarkFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (16, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'RawDomeFlatFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (17, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'RawScienceFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (18, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'RawTwilightFlatFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (24, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'RawFitsData', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (25, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'Template', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (26, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'Template--validation', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (19, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'ReducedScienceFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (20, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'RegriddedFrame', 'YearValue': 2000, 'DateSelection': 'default', 'chip': 'ccd50'}), (21, {'instrument': 'WFI', 'filter': '#844', 'DateSelection': 'default', 'CalTypeSel': 'BiasFrame', 'YearValue': 2000}), (22, {'instrument': 'WFI', 'YearValue': 2000, 'DateSelection': 'default', 'CalTypeSel': 'BiasFrame', 'chip': 'ccd50'}), (23, {'instrument': 'WFI', 'YearValue': 2000, 'DateSelection': 'default', 'CalTypeSel': 'BiasFrame'})]
get_default_filename()

return the default server filename

get_default_server()

return the default server address

get_testset(case)

(derived) return the test set

html_gen_class

alias of astro.services.calts.HtmlCalibrationQuality.HtmlCalibrationQuality

astro.test.services.HtmlCalibrationQuality_test module

test cases for HtmlCalibrationQuality

class astro.test.services.HtmlCalibrationQuality_test.testHtmlCalibrationQuality(*args, **kwargs)

Bases: common.test.services.WebServerBaseTest.WebServerBaseTest

cases = [(0, {}), (1, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'BiasFrame', 'View': 'Graph', 'DateSelection': 'default', 'year': 2000, 'chip': 'ccd50'}), (2, {'instrument': 'WFI', 'CalTypeSel': 'BiasFrame', 'View': 'Graph', 'DateSelection': 'default', 'year': 2000, 'chip': 'ccd50'}), (3, {'instrument': 'WFI', 'filter': '#844', 'quarter': 1, 'CalTypeSel': 'BiasFrame', 'View': 'Graph', 'DateSelection': 'default', 'year': 2000, 'chip': 'ccd50'}), (4, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'BiasFrame', 'month': 1, 'View': 'Graph', 'DateSelection': 'default', 'year': 2000, 'chip': 'ccd50'}), (5, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'BiasFrame', 'week': 1, 'View': 'Graph', 'DateSelection': 'default', 'year': 2000, 'chip': 'ccd50'}), (6, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'BiasFrame', 'View': 'Graph', 'DateSelection': 'default', 'year': 2000, 'opt_hide_eclipsed': 'on', 'chip': 'ccd50'}), (7, {'instrument': 'WFI', 'filter': '#844', 'opt_hide_flagged': 'on', 'CalTypeSel': 'BiasFrame', 'View': 'Graph', 'DateSelection': 'default', 'year': 2000, 'chip': 'ccd50'}), (8, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'BiasFrame', 'View': 'Table', 'DateSelection': 'default', 'year': 2000, 'chip': 'ccd50'}), (9, {'instrument': 'WFI', 'filter': '#844', 'CalTypeSel': 'RawBiasFrame', 'View': 'Table', 'DateSelection': 'default', 'year': 2000, 'chip': 'ccd50'}), (10, {'instrument': 'WFI', 'filter': '#844', 'quarter': 1, 'CalTypeSel': 'ReducedScienceFrame', 'View': 'Table', 'DateSelection': 'default', 'year': 2000, 'chip': 'ccd50'}), (11, {'instrument': 'WFI', 'filter': '#844', 'quarter': 1, 'CalTypeSel': 'CoaddedRegriddedFrame', 'View': 'Table', 'DateSelection': 'default', 'year': 2000, 'chip': 'ccd50'})]
get_default_filename()

return the server url filename part

get_default_server()

return the default server address

get_testset(case)

(derived) return the test test defined by the argument test

html_gen_class

alias of astro.services.calts.HtmlCalibrationQuality.HtmlCalibrationQuality

min_len = 17000

astro.test.services.HtmlCalibrationTable_test module

test cases for HtmlCalibrationTable

class astro.test.services.HtmlCalibrationTable_test.testHtmlCalibrationTable(*args, **kwargs)

Bases: common.test.services.WebServerBaseTest.WebServerBaseTest

cases = [(0, {'month': '6', 'CalTypeSel': 'RawScienceFrame', 'instrument': 'WFI', 'night': '8', 'View': 'Table', 'DateSelection': 'default', 'year': '2002'}), (1, {'instrument': 'WFI', 'CalTypeSel': 'BiasFrame', 'opt_hide_flagged': 'on', 'View': 'Table', 'DateSelection': 'default', 'year': '2002'}), 'ReadNoise', 'HotPixelMap', 'GainLinearity', 'ColdPixelMap', 'BiasFrame', 'DomeFlatFrame', 'TwilightFlatFrame', 'NightSkyFlatFrame', 'FringeFrame', 'MasterFlatFrame', 'IlluminationCorrectionFrame', 'IlluminationCorrection', 'PhotometricParameters', 'PhotTransformation', 'PhotSrcCatalog', 'RawBiasFrame', 'RawDarkFrame', 'RawDomeFlatFrame', 'RawScienceFrame', 'RawTwilightFlatFrame', 'RawFitsData', 'ReducedScienceFrame', 'RegriddedFrame', 'CoaddedRegriddedFrame', 'QuickCheckFrame', 'AstrometricParameters', 'SourceList', 'AssociateList']
get_args(input_class)

get the arguments for the test for the given input class

get_default_filename()

return the default server filename

get_default_server()

return the default server address

get_testset(case)

(derived) returns the test test defined by the argument test

get_testset_for_class(input_class)

make a test for the given input_class

get_testset_for_dict(count, args)

make a test for the args

html_gen_class

alias of astro.services.calts.HtmlCalibrationQuality.HtmlCalibrationQuality

astro.test.services.HtmlComment_test module

test cases for HtmlComment

class astro.test.services.HtmlComment_test.testHtmlComment(*args, **kwargs)

Bases: common.test.services.WebServerBaseTest.WebServerBaseTest

cases = [(0, {'id': 'BDC94FBCEA1FB9EDE0307D8179063AA9', 'Type': 'MasterFlatFrame'})]
get_default_filename()

return the default server filename

get_default_server()

return the default server address

get_testset(case)

(derived) returns the test test defined by the argument test

html_gen_class

alias of astro.services.calts.HtmlCalibrationQuality.HtmlCalibrationQuality

astro.test.services.HtmlDbView_test module

Test cases for the DbView web services

class astro.test.services.HtmlDbView_test.DBviewHTMLParser(table='')

Bases: html.parser.HTMLParser

html parser for getting : - all form elements - all links to objectview

handle_data(data)

handle data

handle_endtag(tag)
handle_starttag(tag, attrs)
make_dict(a_list)

make a dictionary from [(a,b), (c,d), …] {a:b, c:d}

astro.test.services.HtmlDbView_test.getTableTestSets()

return the test sets for all tables

class astro.test.services.HtmlDbView_test.testDBview(*args, **kwargs)

Bases: common.test.services.WebServerBaseTest.WebServerBaseTest

Class generates test cases for the dbview web service

for each table in the database the following forms are generated :

1 The query form 2 The query form to depth 2 3 The submit of the query form, the output form 4 The objectview of the first result from the link on (3) 5 The uplink view from the link on (4) 6 The class overview
cases = [('', 'Generic', 0, {}), ('astro', 'SourceList_sources_422411', 1, {'class_str': 'SourceList*sources[422411]', 'mode': 'table_qry'}), ('astro', 'SourceList_sources_422411', 2, {'numrows': 100, 'SourceList*sources[422411].SLID': '422411', 'class_str': 'SourceList*sources[422411]', 'mode': 'table_res', 'SourceList*sources[422411].SLID.op': '='}), ('astro', 'AssociateList_associates_171561', 3, {'class_str': 'AssociateList*associates[171561]', 'mode': 'table_qry'}), ('astro', 'AssociateList_associates_171561', 4, {'AssociateList*associates.ALID.op': '=', 'AssociateList*associates.ALID': '171561', 'class_str': 'AssociateList*associates[171561]', 'mode': 'table_res', 'numrows': 100, 'AssociateList*associates.expanded': 'open'}), ('BIASFRAME', 0), ('BIASFRAME', 1), ('BIASFRAME', 2), ('BIASFRAME', 3), ('BIASFRAME', 4), ('BIASFRAME', 5), ('BIASFRAMEPARAMETERS', 0), ('BIASFRAMEPARAMETERS', 1), ('BIASFRAMEPARAMETERS', 2), ('BIASFRAMEPARAMETERS', 3), ('BIASFRAMEPARAMETERS', 4), ('BIASFRAMEPARAMETERS', 5), ('BOUNDINGBOX', 0), ('BOUNDINGBOX', 1), ('BOUNDINGBOX', 2), ('BOUNDINGBOX', 3), ('BOUNDINGBOX', 4), ('BOUNDINGBOX', 5), ('COADDEDREGRIDDEDFRAME', 0), ('COADDEDREGRIDDEDFRAME', 1), ('COADDEDREGRIDDEDFRAME', 2), ('COADDEDREGRIDDEDFRAME', 3), ('COADDEDREGRIDDEDFRAME', 4), ('COADDEDREGRIDDEDFRAME', 5), ('GASTROMETRIC', 0), ('GASTROMETRIC', 1), ('GASTROMETRIC', 2), ('GASTROMETRIC', 3), ('GASTROMETRIC', 4), ('GASTROMETRIC', 5), ('RAWBIASFRAME', 0), ('RAWBIASFRAME', 1), ('RAWBIASFRAME', 2), ('RAWBIASFRAME', 3), ('RAWBIASFRAME', 4), ('RAWBIASFRAME', 5), ('RAWBIASFRAMEPARAMETERS', 0), ('RAWBIASFRAMEPARAMETERS', 1), ('RAWBIASFRAMEPARAMETERS', 2), ('RAWBIASFRAMEPARAMETERS', 3), ('RAWBIASFRAMEPARAMETERS', 4), ('RAWBIASFRAMEPARAMETERS', 5), ('RAWFITSDATA', 0), ('RAWFITSDATA', 1), ('RAWFITSDATA', 2), ('RAWFITSDATA', 3), ('RAWFITSDATA', 4), ('RAWFITSDATA', 5), ('REGRIDDEDFRAME', 0), ('REGRIDDEDFRAME', 1), ('REGRIDDEDFRAME', 2), ('REGRIDDEDFRAME', 3), ('REGRIDDEDFRAME', 4), ('REGRIDDEDFRAME', 5), ('REGRIDDEDFRAMEPARAMETERS', 0), ('REGRIDDEDFRAMEPARAMETERS', 1), ('REGRIDDEDFRAMEPARAMETERS', 2), ('REGRIDDEDFRAMEPARAMETERS', 3), ('REGRIDDEDFRAMEPARAMETERS', 4), ('REGRIDDEDFRAMEPARAMETERS', 5), ('SUBWINSTAT', 0), ('SUBWINSTAT', 1), ('SUBWINSTAT', 2), ('SUBWINSTAT', 3), ('SUBWINSTAT', 4), ('SUBWINSTAT', 5)]
get_default_filename()

return the default server filename

get_default_server()

return the default server address

get_html_filename(table, count)

generate a filename for the html

get_test_args(table, count)

get the arguments for the current test

get_test_check(table, count)

get the check method for the current test

get_test_description(table, count)

give a description of the current test

get_testset(case)

(derived) returns the test test defined by the argument test

html_gen_class

alias of astro.services.dbview.HtmlDbView.HtmlDbView

html_test(html)

test the html for errors : - if an error string is found - if the start screen is returned

setUp()

astro.test.services.HtmlDir_test module

test cases for HtmlDir

class astro.test.services.HtmlDir_test.testHtmlComment(*args, **kwargs)

Bases: common.test.services.WebServerBaseTest.WebServerBaseTest

cases = [(0, {'request': '.'})]
get_default_filename()

return the default server filename

get_default_server()

return the default server address

get_testset(case)

(derived) returns the test test defined by the argument test

html_gen_class

alias of common.services.general.HtmlDir.HtmlDir

setUp()
tearDown()

astro.test.services.HtmlGmap_test module

test cases for HtmlGoWise

class astro.test.services.HtmlGmap_test.testHtmlGmap(*args, **kwargs)

Bases: common.test.services.WebServerBaseTest.WebServerBaseTest

cases = [(0, {})]
get_default_filename()

return the default server filename

get_default_server()

return the default server address

get_testset(case)

(derived) returns the test test defined by the argument test

html_gen_class

alias of astro.services.skymap.HtmlGMap.HtmlGMap

astro.test.services.HtmlGoWise_test module

test cases for HtmlGoWise

class astro.test.services.HtmlGoWise_test.testHtmlGoWise(*args, **kwargs)

Bases: common.test.services.WebServerBaseTest.WebServerBaseTest

cases = [(0, {}), (1, {'search': 'm51'}), (2, {'search': 'm51', 'resolve': 'on'}), (3, {'fixed_project': 'ALL', 'search': 'm51', 'resolve': 'on'})]
get_default_filename()

return the default server filename

get_default_server()

return the default server address

get_testset(case)

(derived) returns the test test defined by the argument test

html_gen_class

alias of astro.services.gowise.HtmlGoWise.HtmlGoWise

astro.test.services.HtmlProcess2_test module

tests for the Target Processor GUI

class astro.test.services.HtmlProcess2_test.Checker(minlength, error_string, expect_error)

Bases: object

checkErrorString(html)
checkLength(html)
astro.test.services.HtmlProcess2_test.al_get_id(html, pos)

from the html extract the first id after pos

astro.test.services.HtmlProcess2_test.getClassTestSets()

return the test sets for all classes

class astro.test.services.HtmlProcess2_test.testHtmlProcess2(*args, **kwargs)

Bases: common.test.services.WebServerBaseTest.WebServerBaseTest

cases = [[{'option': '6', 'submitted': '0'}, 10000, 'name_resolve', False], [{'option': '6', 'name': 'm99'}, 11000, 'name_resolve_m99', False], [{'option': '1', 'submitted': '0'}, 12000, 'preferences', False], [{'option': '3', 'submitted': '0'}, 10000, 'upload_code', False], [{}, 10000, 'main_page', False], [{'instrument': 'NOT_EXSTING', 'project': 'NOT_EXSTING', 'mode': '1'}, 10000, 'unknown_project', True], [{'instrument': 'WFI', 'project': 'WFI@2.2m', 'mode': '1'}, 10000, 'WFI_project', False], ('AstrometricParameters', 2, 0), ('AstrometricParameters', 2, 1), ('AstrometricParameters', 2, 2), ('AstrometricParameters', 2, 3), ('AstrometricParameters', 2, 4), ('AstrometricParameters', 2, 5), ('AstrometricParameters', 2, 6), ('AstrometricParameters', 2, 7), ('AstrometricParameters', 2, 8), ('AstrometricParameters', 2, 9), ('AstrometricParameters', 2, 10), ('BiasFrame', 2, 0), ('BiasFrame', 2, 1), ('BiasFrame', 2, 2), ('BiasFrame', 2, 3), ('BiasFrame', 2, 4), ('BiasFrame', 2, 5), ('BiasFrame', 2, 6), ('BiasFrame', 2, 7), ('BiasFrame', 2, 8), ('BiasFrame', 2, 9), ('BiasFrame', 2, 10), ('MasterFlatFrame', 2, 0), ('MasterFlatFrame', 2, 1), ('MasterFlatFrame', 2, 2), ('MasterFlatFrame', 2, 3), ('MasterFlatFrame', 2, 4), ('MasterFlatFrame', 2, 5), ('MasterFlatFrame', 2, 6), ('MasterFlatFrame', 2, 7), ('MasterFlatFrame', 2, 8), ('MasterFlatFrame', 2, 9), ('MasterFlatFrame', 2, 10), ('PhotometricParameters', 2, 0), ('PhotometricParameters', 2, 1), ('PhotometricParameters', 2, 2), ('PhotometricParameters', 2, 3), ('PhotometricParameters', 2, 4), ('PhotometricParameters', 2, 5), ('PhotometricParameters', 2, 6), ('PhotometricParameters', 2, 7), ('PhotometricParameters', 2, 8), ('PhotometricParameters', 2, 9), ('PhotometricParameters', 2, 10), ('ReducedScienceFrame', 2, 0), ('ReducedScienceFrame', 2, 1), ('ReducedScienceFrame', 2, 2), ('ReducedScienceFrame', 2, 3), ('ReducedScienceFrame', 2, 4), ('ReducedScienceFrame', 2, 5), ('ReducedScienceFrame', 2, 6), ('ReducedScienceFrame', 2, 7), ('ReducedScienceFrame', 2, 8), ('ReducedScienceFrame', 2, 9), ('ReducedScienceFrame', 2, 10), ('TwilightFlatFrame', 2, 0), ('TwilightFlatFrame', 2, 1), ('TwilightFlatFrame', 2, 2), ('TwilightFlatFrame', 2, 3), ('TwilightFlatFrame', 2, 4), ('TwilightFlatFrame', 2, 5), ('TwilightFlatFrame', 2, 6), ('TwilightFlatFrame', 2, 7), ('TwilightFlatFrame', 2, 8), ('TwilightFlatFrame', 2, 9), ('TwilightFlatFrame', 2, 10)]
get_associatelist(submode)

get the tests for associatelist

get_check(minlength, expect_error=False)

get the check methods for the test_set

get_default_filename()

return the default server filename

get_default_server()

return the default server address

get_galfit(submode)

do the tests for GalFit

get_galphot(submode)

do the galphot tests

get_input_master_dict()

depending on whether it is live test or using a html generator, return the master_dict which should be used as input

get_process_parameters(class_str, submode)

test the preferences screen for the current target

get_testset(case)

(derived) returns the test test defined by the argument case

html_gen_class

alias of astro.services.process2.HtmlProcess.HtmlProcess

iter_mode(class_str, mode, submode)

iterate through the modes

iter_mode3(class_str, submode)

do mode 3 testing

iter_mode4(class_str, submode)

Do mode 4 testing

make_args(args)

fill the args dict

mode_error_str = '<p style="font-weight:bold;color:red;">Error(s) encountered <br>'
setUp()

astro.test.services.HtmlTemplate_test module

test cases for HtmlTemplate use template from a file and from a string compare the output of both

astro.test.services.HtmlTemplate_test.set_block(template)
class astro.test.services.HtmlTemplate_test.testHtmlTemplate(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
test_template()

astro.test.services.HtmlWenss_test module

class astro.test.services.HtmlWenss_test.testHtmlWenss(methodName='runTest')

Bases: unittest.case.TestCase

generate_html(args)

generate the html given the arguments

setUp()
tearDown()
test_catalogue()

get a catalogue plot page

test_main()

get the main page of the WENSS pages

test_neighbour()

get neighbour plot page

astro.test.services.ImageServerPerformanceTest module

Performace test for the image server

Use the DPU to start jobs on the cluster which request cutouts from the image server

Example : >awe ImageServerPerformance_test.py

Help : >awe ImageServerPerformance_test.py –help

The method compare_log_job can be used to compare the requested cutouts with the cutouts made on the server

from astro.test.services.ImageServerPerformance_test import compare_log_job compare_log_job(job_dict_filename, log_filename)

astro.test.services.ImageServerPerformanceTest.analyze_log(logfile)

read in the log file, return dict with filenames and cutout coords

astro.test.services.ImageServerPerformanceTest.compare_log_job(jobdict_file, logfile)

compare the job dict with the output of the logfile the job dict pickle is saved after the job is submitted the logfile can be retrieved from the server

astro.test.services.ImageServerPerformanceTest.getEnv()

get a environment structure overriding the defaults

astro.test.services.ImageServerPerformanceTest.make_dpu_info(jobs)

given the jobs make a description for the dpu

class astro.test.services.ImageServerPerformanceTest.testPerformanceImageServer(methodName='runTest')

Bases: unittest.case.TestCase

get_coord(frame)

return random coordinates for cutout, given the frame

get_frames()

make a list of frames

setUp()
tearDown()
test_imageserver()

start testing

astro.test.services.TestJobs module

CutoutJob class

class astro.test.services.TestJobs.CutoutJob

Bases: common.net.Jobs.Job

Job for requesting a cutout from the image server

execute()

request cutout(s) form the image server

class astro.test.services.TestJobs.DataZipJob

Bases: common.net.Jobs.Job

Job for doing parallel requests to the data server for (un) zipping files

execute()

request (un)zipped files form the data server

astro.test.services.imageserver_test module

Test imageserver processing

These tests assume a running Image Server.

astro.test.services.imageserver_test.get_from_imageserver_dict(img_dict)
astro.test.services.imageserver_test.get_from_imageserver_list(filename, xmin, xmax, ymin, ymax)
class astro.test.services.imageserver_test.testImageServerProcessing(methodName='runTest')

Bases: unittest.case.TestCase

file1 = 'OCAM.2001-07-18T12:08:08.598_31.fits'
file2 = 'Cal-JBOUT-WFI---------ccd50-Mas---Bias-54117.5739867-922ecd3babfa29f32c4080c71ea07071f6ba29bf.fits'
file3 = 'WFI.2005-06-08T21:40:50.953_8.fits'
file4 = 'Cal-PHERAUDEAU-WFC-------193-A5383-17-7-Regr---Wei-53961.6465531.fits'
file5 = 'Sci-PHERAUDEAU-WFC-------193-A5506-4-Red---Sci-53926.6481175.fits'
file6 = 'Sci-GSIKKEMA-WFI-------#879---Coadd---Sci-53917.8589093.fits'
setUp()

filenames list will keep track of generated files

tearDown()
test_cutout_using_dict()

test generating cutouts using a dict with sky coordinates

test_cutout_using_dict2()

test generating cutouts using a dict with pixel coordinates

test_fitsio_compressed()

Test getting a cutout from a FITSIO compressed file

test_gzip_compressed()

Test getting a cutout from a gzip compressed file

test_region_completely_outside_image()

Test getting a cutout which is completely outside the image

test_uncompressed_16bit()

Test getting a cutout from a 16 bit uncompressed file

test_uncompressed_32bit()

Test getting a cutout from a 32 bit uncompressed file

test_urls()

the the urls

test_xmax_greater_than_naxis1()

Test getting a cutout from a file where the region boundary is partly outside the image.

test_xmin_smaller_than_0()

Test getting a cutout from a file where the region boundary is partly outside the image.

urls_to_test = ['imageview?Queryselect=ListSourceListCutouts&SLID=71311', 'imageview?Queryselect=WebImage&Formselect=RegriddedFrame&filename=Sci-TSCHNEIDER-MDM8K-------R-4-Regr---Sci-53817.4118627.fits&subdir=DB_img&resizewindow=1']

Module contents