Groundstation Tests

This folder contains the test for the groundstation application

Test Backend API

class groundstation.tests.test_api.TestCommunicationsService(methodName='runTest')
test_get_communication_with_max_id_empty_db()

This test exposes a bug which was fixed on branch ‘hotfix/communications-dynamic-filter’

class groundstation.tests.test_api.TestFlightScheduleService(methodName='runTest')
class groundstation.tests.test_api.TestHousekeepingService(methodName='runTest')

Test the housekeeping/satellite model service

test_get_all_housekeeping()

Get all housekeeping that is currently in the database

test_get_all_housekeeping_order_by_date()

Ensure that housekeeping is returned by date

test_get_housekeeping()

Test getting a housekeeping log

test_post_housekeeping_locally()

Since local data is wrapped differently than data over http, we must send and receive it differently (locally it is a tuple of dicts)

test_post_housekeeping_with_invalid_timestamp()

Ensure that the timestamp is a valid datetime

test_post_housekeeping_with_no_timestamp()

all housekeeping logs/beacons should have a timestamp with them ensure that this timestamp exists

class groundstation.tests.test_api.TestPassoverService(methodName='runTest')
class groundstation.tests.test_api.TestTelecommandList(methodName='runTest')
class groundstation.tests.test_api.TestTelecommandService(methodName='runTest')
class groundstation.tests.test_api.TestUserService(methodName='runTest')

Test Authentication

class groundstation.tests.test_auth.TestAuthentication(methodName='runTest')
setUp()

Hook method for setting up the test fixture before exercising it.

Test Backend Utilities

class groundstation.tests.test_backend_utils.TestUtils(methodName='runTest')

Test App Configurations

class groundstation.tests.test_config.TestTestingConfig(methodName='runTest')

Test Data Models

class groundstation.tests.test_models.TestCommandModel(methodName='runTest')

Test adding a command

class groundstation.tests.test_models.TestFlightScheduleCommandsArgsModel(methodName='runTest')

Test adding an argument to a command

class groundstation.tests.test_models.TestFlightScheduleCommandsModel(methodName='runTest')

Test adding a command to the flight schedule

class groundstation.tests.test_models.TestFlightScheduleModel(methodName='runTest')

“Test adding a flight schedule

class groundstation.tests.test_models.TestHousekeepingModel(methodName='runTest')

Test adding a housekeeping entry

class groundstation.tests.test_models.TestUserModel(methodName='runTest')

Test Satellite Simulator

class groundstation.tests.test_sat_sim.TestSatelliteSimulator(methodName='runTest')

Tests the satellite simulator

Utilities for Testing

groundstation.tests.utils.fake_passover_as_dict(timestamps)

Create mock passovers as a dictionary

Parameters

timestamps (list(datetime.datetime)) – The passover timestamps to use