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

astro.test.services.HtmlCalibrationEdit_test module

astro.test.services.HtmlCalibrationGraph_test module

astro.test.services.HtmlCalibrationQuality_test module

astro.test.services.HtmlCalibrationTable_test module

astro.test.services.HtmlComment_test module

astro.test.services.HtmlDbView_test module

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 HtmlDir

setUp()
tearDown()

astro.test.services.HtmlGmap_test module

astro.test.services.HtmlGoWise_test module

astro.test.services.HtmlProcess2_test module

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

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