tests.system package

Submodules

tests.system.base_test module

Base Test Case

class tests.system.base_test.BaseTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

classmethod setUpClass() → None[source]
  1. Get Args from CLI

  2. Set Test URL

3. Start REST API Service :return:

classmethod tearDownClass() → None[source]

1. Stop REST API Service :return:

tests.system.delete_car_negative_test module

Flask App REST API testing: DELETE

class tests.system.delete_car_negative_test.DeleteCarNegativeTestCase(methodName='runTest')[source]

Bases: tests.system.base_test.BaseTestCase

Simple Flask App Negative Test: DELETE call > cars

setUp() → None[source]

Test data preparation :return:

test_delete_car_wrong_admin_credentials()[source]

Delete car using wrong admin user credentials. :return:

test_delete_car_wrong_non_admin_credentials()[source]

Get full list of cars using wrong non admin user credentials. :return:

tests.system.delete_car_positive_test module

Flask App REST API testing: DELETE

class tests.system.delete_car_positive_test.DeleteCarPositiveTestCase(methodName='runTest')[source]

Bases: tests.system.base_test.BaseTestCase

Simple Flask App Positive Test: DELETE call > cars

setUp() → None[source]

Test data preparation :return:

tearDown() → None[source]

Hook method for deconstructing the test fixture after testing it.

test_delete_car_admin()[source]

Delete car using admin user credentials. :return:

test_delete_car_non_admin()[source]

Get full list of cars using non admin user credentials. :return:

tests.system.get_cars_negative_test module

Flask App REST API testing: GET

class tests.system.get_cars_negative_test.GetCarsNegativeTestCase(methodName='runTest')[source]

Bases: tests.system.base_test.BaseTestCase

Simple Flask App Negative Test: GET call > cars

setUp() → None[source]

Test data preparation :return:

test_get_car_by_name_non_admin_swift_wrong_credentials()[source]

Get car data by name = ‘swift’ using wrong non admin user credentials. :return:

test_get_car_by_name_swift_empty_credentials()[source]

Get car data by name = ‘swift’ using empty user credentials. :return:

test_get_list_of_cars_admin_hatchback_wrong_credentials()[source]

Get full list of cars from type = ‘hatchback’ using wrong admin user credentials. :return:

test_get_list_of_cars_admin_wrong_credentials()[source]

Get full list of cars using wrong admin user credentials. Wrong password + Correct username. Correct password + Wrong username. :return:

test_get_list_of_cars_empty_credentials()[source]

Get full list of cars using empty username/password. Empty password + Empty username. :return:

test_get_list_of_cars_non_admin_sedan_wrong_credentials()[source]

Get full list of cars of type = ‘sedan’ using wrong non admin user credentials. :return:

test_get_list_of_cars_non_admin_wrong_credentials()[source]

Get full list of cars using wrong non admin user credentials. Wrong password + Correct username. Correct password + Wrong username. :return:

test_get_list_of_cars_sedan_empty_credentials()[source]

Get full list of cars of type = ‘sedan’ using empty credentials. :return:

tests.system.get_cars_positive_test module

Flask App REST API testing: GET

class tests.system.get_cars_positive_test.GetCarsPositiveTestCase(methodName='runTest')[source]

Bases: tests.system.base_test.BaseTestCase

Simple Flask App Positive Test: GET call > cars

setUp() → None[source]

Test data preparation :return:

test_get_car_by_name_non_admin_swift()[source]

Get car data by name = ‘swift’ using non admin user credentials. :return:

test_get_list_of_cars_admin()[source]

Get full list of cars using admin user credentials. :return:

test_get_list_of_cars_admin_hatchback()[source]

Get full list of cars from type = ‘hatchback’ using admin user credentials. :return:

test_get_list_of_cars_non_admin()[source]

Get full list of cars using non admin user credentials. :return:

test_get_list_of_cars_non_admin_sedan()[source]

Get full list of cars of type = ‘sedan’ using non admin user credentials. :return:

tests.system.post_cars_negative_test module

Flask App REST API testing: POST

class tests.system.post_cars_negative_test.PostCarsPositiveTestCase(methodName='runTest')[source]

Bases: tests.system.base_test.BaseTestCase

Simple Flask App Negative Test: POST call

setUp() → None[source]

Test data preparation :return:

test_post_car_wrong_admin_credentials()[source]

Add new car using wrong admin user credentials. :return:

test_post_car_wrong_non_admin_credentials()[source]

Add new car using wrong non admin user credentials. :return:

tests.system.post_cars_positive_test module

Flask App REST API testing: POST

class tests.system.post_cars_positive_test.PostCarsPositiveTestCase(methodName='runTest')[source]

Bases: tests.system.base_test.BaseTestCase

Simple Flask App Positive Test: POST call

setUp() → None[source]

Test data preparation :return:

tearDown() → None[source]

Post test procedure :return:

test_post_car_admin()[source]

Add new car using admin user credentials. :return:

test_post_car_non_admin()[source]

Add new car using non admin user credentials. :return:

tests.system.post_register_positive_test module

Flask App REST API testing: POST

class tests.system.post_register_positive_test.PostCarRegistrationPositiveTestCase(methodName='runTest')[source]

Bases: tests.system.base_test.BaseTestCase

Simple Flask App Positive Test: POST call

setUp() → None[source]

Test data preparation :return:

tearDown() → None[source]

Post test procedure :return:

test_register_car_admin()[source]

Register car using admin user credentials. :return:

test_register_car_non_admin()[source]

Register car using non admin user credentials. :return:

tests.system.put_cars_negaive_test module

Flask App REST API testing: PUT

class tests.system.put_cars_negaive_test.PutCarNegativeTestCase(methodName='runTest')[source]

Bases: tests.system.base_test.BaseTestCase

Simple Flask App Negative Test: PUT call > cars

setUp() → None[source]

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

test_put_update_car_admin_wrong_credentials()[source]

Update car properties using wrong admin user credentials. :return:

test_put_update_car_non_admin_wrong_credentials()[source]

Update car properties using wrong non admin user credentials. :return:

tests.system.put_cars_positive_test module

Flask App REST API testing: PUT

class tests.system.put_cars_positive_test.PutCarPositiveTestCase(methodName='runTest')[source]

Bases: tests.system.base_test.BaseTestCase

Simple Flask App Positive Test: PUT call > cars

setUp() → None[source]

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

tearDown() → None[source]

Hook method for deconstructing the test fixture after testing it.

test_put_update_car_admin()[source]

Update car properties using admin user credentials. :return:

test_put_update_car_non_admin()[source]

Update car properties using non admin user credentials. :return:

Module contents