tests.end_to_end_test package

Submodules

tests.end_to_end_test.end_to_end_test_helper module

class for end to end test helper

class tests.end_to_end_test.end_to_end_test_helper.EndToEndTestHelper(plaso_dir_path: str, name: str)[source]

Bases: object

Class defining Variables to be used multiple times in tests

ADDITIONAL_TIMESTAMP = 'Enter \\(additional\\) timestamp events from the query \\[columnName,aliasName...\\] or \\[abort\\]\\:'
ADDITIONAL_TIMESTAMP_ABORT = 'abort'
ADDITIONAL_TIMESTAMP_INVALID = 'Timestamps are not in valid format\\. Reenter them correctly \\[name\\,name\\.\\.\\.\\]'
ADD_ANSWER_NO = 'n'
ADD_ANSWER_YES = 'Y'
ADD_QUESTION = 'Do you want to add another Query\\? \\[Y\\/n\\]\\:'
COLUMN_ANSWER_NO = 'N'
COLUMN_ANSWER_YES = 'Y'
COLUMN_QUESTION_CREATED_DATE = 'Is the column a time event\\? createdDate \\[Y\\/n\\]\\:'
COLUMN_QUESTION_DATE = 'Is the column a time event\\? date \\[Y\\/n\\]\\:'
COLUMN_QUESTION_PROFILE_TIMELINE = 'Is the column a time event\\? includeInProfileTimeline \\[Y\\/n\\]\\:'
COLUMN_QUESTION_UPDATED_AT = 'Is the column a time event\\? updatedAt \\[Y\\/n\\]\\:'
CUSTOM_ADD_INVALID = 'Column names are not in valid format\\. Reenter them correctly \\[name\\,name\\.\\.\\.\\]'
CUSTOM_ADD_MORE_ANSWER_NO = 'N'
CUSTOM_ADD_MORE_ANSWER_YES = 'Y'
CUSTOM_ADD_MORE_QUESTION = 'Do you want to add more columns that are customizable\\? \\[y\\/N\\]\\:'
CUSTOM_ADD_QUESTION = 'Enter columns that are customizable \\[columnName\\,aliasName\\.\\.\\.\\] or \\[abort\\]\\:'
CUSTOM_ANSWER_NO = 'N'
CUSTOM_ANSWER_YES = 'Y'
CUSTOM_QUESTION_STATUSES = 'Does the event Statuses need customizing\\? \\[y\\/N\\]\\:'
CUSTOM_QUESTION_THEUSER = 'Does the event TheUser need customizing\\? \\[y\\/N\\]\\:'
CUSTOM_QUESTION_USERS = 'Does the event Users need customizing\\? \\[y\\/N\\]\\:'
CUSTOM_QUESTION_USERSSTATUSES = 'Does the event Usersstatuses need customizing\\? \\[y\\/N\\]\\:'
DATABASE_PATH = '/home/docs/checkouts/readthedocs.org/user_builds/plasoscaffolder/checkouts/latest/src/tests/test_database'
DIR_PATH = '/home/docs/checkouts/readthedocs.org/user_builds/plasoscaffolder/checkouts/latest/src/tests/end_to_end_test'
GENERATE_ANSWER_NO = 'N'
GENERATE_ANSWER_YES = 'Y'
GENERATE_QUESTION = 'Do you want to Generate the files\\? \\[Y\\/n\\]\\:'
MAIN_PATH = '/home/docs/checkouts/readthedocs.org/user_builds/plasoscaffolder/checkouts/latest/src/plasoscaffolder/frontend/main.py'
MORE_TIMESTAMPS_ANSWER_NO = 'N'
MORE_TIMESTAMPS_ANSWER_YES = 'Y'
MORE_TIMESTAMPS_QUESTION = 'Do you want to add more timestamps\\? \\[y\\/N\\]\\:'
NAME_ANSWER = 'test'
NAME_QUESTION = "What's the name of the plugin\\?\\:"
NAME_QUESTION_EXISTS = 'Plugin exists\\. Choose new Name'
NAME_QUESTION_NOT_VALID = 'Plugin is not in a valid format\\. Choose new Name \\[plugin\\_name\\_\\.\\.\\.\\]'
NAME_ROW_ANSWER_NO = 'N'
NAME_ROW_ANSWER_YES = 'Y'
NAME_ROW_QUESTION_INVALID = 'Row name is not in a valid format\\. Choose new Name \\[RowName\\.\\.\\.\\]'
NAME_ROW_QUESTION_QUERY = 'What row does the SQL Query parse\\?\\:'
NAME_ROW_QUESTION_STATUSES = 'Do you want to name the query parse row\\: Statuses \\? \\[Y\\/n\\]\\:'
NAME_ROW_QUESTION_USERS = 'Do you want to name the query parse row\\: Users \\? \\[Y\\/n\\]\\:'
NAME_ROW_QUESTION_USERSSTATUSES = 'Do you want to name the query parse row\\: Usersstatuses \\? \\[Y\\/n\\]\\:'
OUTPUT_ADD_ANSWER_NO = 'n'
OUTPUT_ADD_ANSWER_YES = 'y'
OUTPUT_ADD_QUESTION = 'Do you want to add this query\\? \\[Y\\/n\\]\\:'
OUTPUT_ANSWER_NO = 'n'
OUTPUT_ANSWER_YES = 'y'
OUTPUT_EXAMPLE_FIRST_ROW = 'Your query output could look like this\\.'
OUTPUT_QUESTION = 'Do you want to have a output example for your SQL Query\\? \\[Y\\/n\\]\\:'
OUTPUT_USERS_ID_EXAMPLE_FIRST_ROW = "\\(5402612\\, 'BBC Breaking News'\\, 1177252957\\.0\\)"
OUTPUT_USERS_ID_EXAMPLE_SECOND_ROW = "\\(13334762\\, 'GitHub'\\, 1202704910\\.0\\)"
OUTPUT_USERS_ID_EXAMPLE_THIRD_ROW = "\\(14388264\\, 'Tom Pohl'\\, 1208195714\\.0\\)"
OUTPUT_USERS_ID_NAME_EXAMPLE_HEADER = "\\['id'\\, 'name'\\, 'createdDate'\\]"
PATH_QUESTION = "What's the path to the plaso project\\?\\:"
PATH_WRONG_QUESTION = 'Folder does not exists\\. Enter correct one'
ReadFromFile(path: str)[source]

read from file helper

SQL_ANSWER = 'select * from users'
SQL_ANSWER_2 = 'select * from statuses'
SQL_ANSWER_ESCAPED = 'select \\* from users'
SQL_ANSWER_ESCAPED_2 = 'select \\* from statuses'
SQL_ANSWER_ESCAPED_ID_NAME = 'select id\\, name\\, createdDate from users'
SQL_ANSWER_ID_NAME = 'select id, name, createdDate from users'
SQL_ANSWER_OK = 'The SQL query was ok.'
SQL_QUESTION = 'Please write your SQL script for the plugin\\:'
SQL_QUESTION_WITH_ABORT = "Please write your SQL script for the plugin \\['abort' to continue\\]\\:"
TESTFILE_ANSWER = '/home/docs/checkouts/readthedocs.org/user_builds/plasoscaffolder/checkouts/latest/src/tests/test_database/twitter_ios.db'
TESTFILE_ANSWER_ERROR = '/home/docs/checkouts/readthedocs.org/user_builds/plasoscaffolder/checkouts/latest/src/tests/test_database/twitter_ios_error.db'
TESTFILE_ANSWER_NOT_FOUND = '/home/docs/checkouts/readthedocs.org/user_builds/plasoscaffolder/checkouts/latest/src/tests/test_database/does_not_exist'
TESTFILE_QUESTION = "What's the path to your test file\\?\\:"
TESTFILE_QUESTION_INVALID = 'Unable to open the database file\\. Choose another\\.'
TESTFILE_QUESTION_NOT_FOUND = 'File does not exists\\. Choose another\\.'

tests.end_to_end_test.test_easy_generation module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_easy_generation.EasyGenerationTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test File for easy Generation

testEasyGeneration()[source]

Test easy file generation without errors

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/twitter_ios.db
  5. Do you want to have a output example for your SQL Query? [Y/n]: n
  6. Please write your SQL script for the plugin: select * from users
  7. The SQL query was ok.
  8. Do you want to name the query parse row: Users ? [Y/n]: Y
  9. Is the column a time event? updatedAt [Y/n]: Y
  10. Is the column a time event? createdDate [Y/n]: Y
  11. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  12. Does the event Users need customizing? [y/N]: N
  13. Do you want to add another Query? [Y/n]: n
  14. Do you want to Generate the files [Y/n]: y

tests.end_to_end_test.test_easy_generation_with_abort module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_easy_generation_with_abort.EasyGenerationWithAbortTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test File for Easy Generation with Abort

testEasyGenerationWithAbort()[source]

Test easy file generation without errors and with abort at the end, not generating the files.

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/twitter_ios.db
  5. Do you want to have a output example for your SQL Query? [Y/n]: n
  6. Please write your SQL script for the plugin: select * from users
  7. The SQL query was ok.
  8. Do you want to name the query parse row: Users ? [Y/n]: Y
  9. Is the column a time event? updatedAt [Y/n]: Y
  10. Is the column a time event? createdDate [Y/n]: Y
  11. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  12. Does the event Users need customizing? [y/N]: N
  13. Do you want to add another Query? [Y/n]: n
  14. Do you want to Generate the files [Y/n]: n

tests.end_to_end_test.test_easy_generation_with_customizing module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_easy_generation_with_customizing.EasyGenerationWithCustomizingTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test File for Generation with Customizing

testEasyGenerationWithCustomizing()[source]

Test easy file generation without errors with customizing option

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/twitter_ios.db
  5. Do you want to have a output example for your SQL Query? [Y/n]: n
  6. Please write your SQL script for the plugin: select * from users
  7. The SQL query was ok.
  8. Do you want to name the query parse row: Users ? [Y/n]: Y
  9. Is the column a time event? updatedAt [Y/n]: Y
  10. Is the column a time event? createdDate [Y/n]: Y
  11. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  12. Does the event Users need customizing? [y/N]: Y
  13. Enter columns that are customizable [columnName,aliasName...] or [ abort]: this that
  14. Column names are not in valid format. Reenter them correctly [name, name...]: this, that
  15. Column names are not in valid format. Reenter them correctly [name, name...]: this,that
  16. Added: Failed: that,this
  17. Do you want to add more columns that are customizable? [y/N]: Y
  18. Enter columns that are customizable [columnName,aliasName...] or [ abort]: this,location,updatedAt
  19. Added: location Failed: updatedAt,that,this
  20. Do you want to add more columns that are customizable? [y/N]: N
  21. Do you want to add another Query? [Y/n]: n
  22. Do you want to Generate the files [Y/n]: Y

tests.end_to_end_test.test_easy_generation_with_multiple_selects module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_easy_generation_with_multiple_selects.EasyGenerationWithMultipleSelectsTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for Generation with multiple selects.

testEasyGenerationWithMultipleSelects()[source]

Test easy file generation without errors with two select queries

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/twitter_ios.db
  5. Do you want to have a output example for your SQL Query? [Y/n]: n
  6. Please write your SQL script for the plugin: select * from users
  7. The SQL query was ok.
  8. Do you want to name the query parse row: Users ? [Y/n]: Y
  9. Is the column a time event? updatedAt [Y/n]: Y
  10. Is the column a time event? createdDate [Y/n]: Y
  11. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  12. Does the event Users need customizing? [y/N]: N
  13. Do you want to add another Query? [Y/n]: Y
  14. Please write your SQL script for the plugin: select * from statuses
  15. The SQL query was ok.
  16. Do you want to name the query parse row: Statuses ? [Y/n]: Y
  17. Is the column a time event? date [Y/n]: Y
  18. Is the column a time event? updatedAt [Y/n]: Y
  19. Is the column a time event? includeInProfileTimeline [Y/n]: N
  20. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  21. Does the event Users need customizing? [y/N]: N
  22. Do you want to add another Query? [Y/n]: Y
  23. Please write your SQL script for the plugin [‘abort’ to continue]: abort
  24. Do you want to Generate the files [Y/n]: Y

tests.end_to_end_test.test_easy_generation_with_output_example module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_easy_generation_with_output_example.EasyGenerationWithOutputTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test File for an Easy Generation Test With Output

testEasyGenerationWithOutputExample()[source]

Test easy file generation without errors and with an output example

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: [pfad]
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: [pfad_file]
  5. Do you want to have a output example for your SQL Query? [Y/n]: Y
  6. Please write your SQL script for the plugin: select id, name, createdDate from users
  7. Your query output could look like this. [‘id’, ‘name’] (5402612, ‘BBC Breaking News’) (13334762, ‘GitHub’) (14388264, ‘Tom Pohl’)
  8. Do you want to add this query? [Y/n]: Y
  9. Do you want to name the query parse row: Users ? [Y/n]: Y
  10. Is the column a time event? createdDate [Y/n]: Y
  11. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  12. Does the event Users need customizing? [y/N]: N
  13. Do you want to add another Query? [Y/n]: n

tests.end_to_end_test.test_easy_generation_with_own_row_name module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_easy_generation_with_own_row_name.EasyGenerationWithOwnRowNameTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test File for Generation With Row Name

testEasyGenerationWithOwnRowName()[source]

Test easy file generation without errors

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/twitter_ios.db
  5. Do you want to have a output example for your SQL Query? [Y/n]: n
  6. Please write your SQL script for the plugin: select * from users
  7. The SQL query was ok.
  8. Do you want to name the query parse row: Users ? [Y/n]: n
  9. What row does the SQL Query parse?: The User 11. Row name is not in a valid format. Choose new Name [RowName...]: theuser
  1. Row name is not in a valid format. Choose new Name [RowName...]: TheUser123
  2. Row name is not in a valid format. Choose new Name [RowName...]: TheUser
  3. Is the column a time event? updatedAt [Y/n]: Y
  4. Is the column a time event? createdDate [Y/n]: Y
  5. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  6. Does the event The User need customizing? [y/N]: N
  7. Do you want to add another Query? [Y/n]: n
  8. Do you want to Generate the files [Y/n]: Y

tests.end_to_end_test.test_easy_generation_with_own_time_event module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_easy_generation_with_own_time_event.EasyGenerationWithOwnTimeEventTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for generation with time event.

testEasyGenerationWithOwnTimeEvent()[source]

Test easy file generation without errors

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/twitter_ios.db
  5. Do you want to have a output example for your SQL Query? [Y/n]: n
  6. Please write your SQL script for the plugin: select * from users
  7. The SQL query was ok.
  8. Do you want to name the query parse row: Users ? [Y/n]: Y
  9. Is the column a time event? updatedAt [Y/n]: n
  10. Is the column a time event? createdDate [Y/n]: Y
  11. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: id that this
  12. Timestamps are not in valid format. Reenter them correctly [name, name...]: id, that, this
  13. Timestamps are not in valid format. Reenter them correctly [name, name...]:id,that,this
  14. Added: createdDate,id Failed: that,this
  15. Do you want to add more timestamps? [y/N]: y
  16. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: name,that
  17. Added: createdDate,id,name
  18. Failed: that,this
  19. Do you want to add more timestamps? [y/N]: n
  20. Does the event Users need customizing? [y/N]: N
  21. Do you want to add another Query? [Y/n]: n
  22. Do you want to Generate the files [Y/n]: Y

tests.end_to_end_test.test_generation_with_an_existing_name module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_generation_with_an_existing_name.EasyGenerationWithExistingNameTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test File for Generation with an existing name

testEasyGenerationWithExistingName()[source]

Test easy file generation without errors

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/twitter_ios.db
  5. Do you want to have a output example for your SQL Query? [Y/n]: n
  6. Please write your SQL script for the plugin: select * from users
  7. The SQL query was ok.
  8. Do you want to name the query parse row: Users ? [Y/n]: Y
  9. Is the column a time event? updatedAt [Y/n]: Y
  10. Is the column a time event? createdDate [Y/n]: Y
  11. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  12. Does the event Users need customizing? [y/N]: N
  13. Do you want to add another Query? [Y/n]: n
  14. Do you want to Generate the files [Y/n]: y
  15. plasoscaffolder sqlite
  16. What’s the path to the plaso project?: tmpdir
  17. What’s the name of the plugin?: test
  18. Plugin exists. Choose new Name: test_plugin
  19. What’s the path to your test file?: test_database/twitter_ios.db
  20. Do you want to have a output example for your SQL Query? [Y/n]: n
  21. Please write your SQL script for the plugin: select * from users
  22. The SQL query was ok.
  23. Do you want to name the query parse row: Users ? [Y/n]: Y
  24. Is the column a time event? updatedAt [Y/n]: Y
  25. Is the column a time event? createdDate [Y/n]: Y
  26. Enter (additional) timestamp events from the query [column-Name,aliasName...] or [abort]: abort
  27. Does the event Users need customizing? [y/N]: N
  28. Do you want to add another Query? [Y/n]: n
  29. Do you want to Generate the files [Y/n]: Y

tests.end_to_end_test.test_generation_with_option_at_tool_call module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_generation_with_option_at_tool_call.GenerateWithOptionAtToolCallTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for generation with options at tool call.

testGenerateWithOptionAtToolCall()[source]

Test file generation with additional options calling the tool

  1. plasoscaffolder sqlite –path tmpdir –name test –testfile test_database/twitter_ios.db –-no-sql
  1. Please write your SQL script for the plugin: select * from users
  2. The SQL query was ok.
  3. Do you want to name the query parse row: Users ? [Y/n]: Y
  4. Is the column a time event? updatedAt [Y/n]: Y
  5. Is the column a time event? createdDate [Y/n]: Y
  6. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  7. Does the event Users need customizing? [y/N]: N
  8. Do you want to add another Query? [Y/n]: n
  9. Do you want to Generate the files [Y/n]: y

tests.end_to_end_test.test_help_function module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_help_function.HelpFunctionTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for help function

testHelpMessage()[source]

test the universal –help Option

tests.end_to_end_test.test_help_function_of_sqlite module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_help_function_of_sqlite.HelpFunctionOfSQLiteTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for help function for sqlite option.

testHelpMessageForSQLitePlugin()[source]

test the –help option for SQLite

tests.end_to_end_test.test_select_easy_join module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_select_easy_join.SelectEasyJoinTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for join.

testSelectEasyJoin()[source]

Test file generation with a join query and invalid input

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/twitter_ios.db
  5. Do you want to have a output example for your SQL Query? [Y/n]: n
  6. Please write your SQL script for the plugin: select * from users join statuses
  7. Please use an alias (AS) for those column names: id updatedAt
  8. Please write your SQL script for the plugin: select id as userid join statuses
  9. Error: near “join”: syntax error
  10. Please write your SQL script for the plugin: select id as userid from users join statuses
  11. Error: ambiguous column name: id
  12. Please write your SQL script for the plugin: select users.id as userid from users join statuses
  13. The SQL query was ok.
  14. Do you want to name the query parse row: Usersstatuses? [Y/n]: Y
  15. Is the column a time event? updatedAt [Y/n]: Y
  16. Is the column a time event? createdDate [Y/n]: Y
  17. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  18. Does the event Users need customizing? [y/N]: N
  19. Do you want to add another Query? [Y/n]: N
  20. Do you want to Generate the files [Y/n]: Y

tests.end_to_end_test.test_select_with_special_characters module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_select_with_special_characters.SelectWithSpecialCharactersTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for select with special characters.

testSelectWithSpecialCharacters()[source]

Test different queries with special characters

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/twitter_ios.db
  5. Do you want to have a output example for your SQL Query? [Y/n]: n
  6. Please write your SQL script for the plugin: select users.id as “userid” from users join statuses
  7. Info: Don’t use any characters beside a-z A-Z . ; , *
  8. Please write your SQL script for the plugin: select hex(id) from users
  9. Warning: Don’t use any characters beside a-z A-Z . ; , *
  10. Please write your SQL script for the plugin: select [AS].[ID] AS [the alias], [AS].name AS “the name” , S.id from users as [AS] join statuses as “S”
  11. Warning: Don’t use any characters beside a-z A-Z . ; , *
  12. Please write your SQL script for the plugin: select id as the-id from user
  13. Warning: Don’t use any characters beside a-z A-Z . ; , *
  14. Please write your SQL script for the plugin: select somealias.id from users as somealias
  15. Warning: Don’t use any alias for a table name
  16. Please write your SQL script for the plugin: select * from users
  17. The SQL query was ok.
  18. Do you want to name the query parse row: Users ? [Y/n]: Y
  19. Is the column a time event? updatedAt [Y/n]: Y
  20. Is the column a time event? createdDate [Y/n]: Y
  21. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  22. Does the event Users need customizing? [y/N]: N
  23. Do you want to add another Query? [Y/n]: n
  24. Do you want to Generate the files [Y/n]: Y

tests.end_to_end_test.test_wrong_path module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_wrong_path.WrongPathTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for wrong path.

testWrongPath()[source]

Test easy file generation with using the wrong path

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?:bla bla
  3. Folder does not exists. Enter correct one: other/wrong
  4. Folder does not exists. Enter correct one: tmpdir
  5. What’s the name of the plugin?: test
  6. What’s the path to your test file?: [pfad_file]
  7. Do you want to have a output example for your SQL Query? [Y/n]: n
  8. Please write your SQL script for the plugin: select * from users
  9. The SQL query was ok.
  10. Do you want to name the query parse row: Users ? [Y/n]: Y
  11. Is the column a time event? updatedAt [Y/n]: Y
  12. Is the column a time event? createdDate [Y/n]: Y
  13. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  14. Does the event Users need customizing? [y/N]: N
  15. Do you want to add another Query? [Y/n]: n
  16. Do you want to Generate the files [Y/n]: Y

tests.end_to_end_test.test_wrong_plugin_name module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_wrong_plugin_name.WrongPluginNameTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for wrong plugin name.

testWrongPluginName()[source]

Test file generation with using a invalid plugin name

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: [pfad]
  3. What’s the name of the plugin?: test plugin
  4. Plugin is not in a valid format. Choose new Name [plugin_name_...]: TestPlugin
  5. Plugin is not in a valid format. Choose new Name [plugin_name_...]: test123_plugin
  6. Plugin is not in a valid format. Choose new Name [plugin_name_...]: test_plugin
  7. What’s the path to your test file?: [pfad_file]
  8. Do you want to have a output example for your SQL Query? [Y/n]: n
  9. Please write your SQL script for the plugin: select * from users
  10. The SQL query was ok.
  11. Do you want to name the query parse row: Users ? [Y/n]: Y
  12. Is the column a time event? updatedAt [Y/n]: Y
  13. Is the column a time event? createdDate [Y/n]: Y
  14. Enter (additional) timestamp events from the query [columnName, aliasName...] or [abort]: abort
  15. Does the event Users need customizing? [y/N]: N
  16. Do you want to add another Query? [Y/n]: n
  17. Do you want to Generate the files [Y/n]: Y

tests.end_to_end_test.test_wrong_sql_query_input module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_wrong_sql_query_input.WrongSQLQueryInputTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for wrong input.

testWrongSQLQueryInput()[source]

Test easy file generation without errors

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/twitter_ios.db
  5. Do you want to have a output example for your SQL Query? [Y/n]: n
  6. Please write your SQL script for the plugin: select * from user
  7. Error: no such table: user
  8. Please write your SQL script for the plugin: select * from users; select * from users
  9. Warning: You can only execute one statement at a time.
  10. Please write your SQL script for the plugin: drop table users
  11. Query has to be a single SELECT query.
  12. Please write your SQL script for the plugin [‘abort’ to continue]: select * from users
  13. The SQL query was ok.
  14. Do you want to name the query parse row: Users ? [Y/n]: Y
  15. Is the column a time event? updatedAt [Y/n]: Y
  16. Is the column a time event? createdDate [Y/n]: Y
  17. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  18. Does the event Users need customizing? [y/N]: N
  19. Do you want to add another Query? [Y/n]: y
  20. Please write your SQL script for the plugin [‘abort’ to continue]: abort
  21. Do you want to Generate the files [Y/n]: Y

tests.end_to_end_test.test_wrong_test_file module

Test Class for end to end Tests. These Tests can only be run on Linux because it makes use of pexpect.

class tests.end_to_end_test.test_wrong_test_file.WrongTestDatabaseFileTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test file for wrong test database file.

testWrongTestFile()[source]

Test easy file generation without errors

  1. plasoscaffolder sqlite
  2. What’s the path to the plaso project?: tmpdir
  3. What’s the name of the plugin?: test
  4. What’s the path to your test file?: test_database/does_not_exists
  5. File does not exists. Choose another.: test_database/twitter_ios_error.db
  6. Unable to open the database file. Choose another.: test_database/twitter_ios.db
  7. Do you want to have a output example for your SQL Query? [Y/n]: n
  8. Please write your SQL script for the plugin: select * from users
  9. The SQL query was ok.
  10. Do you want to name the query parse row: Users ? [Y/n]: Y
  11. Is the column a time event? updatedAt [Y/n]: Y
  12. Is the column a time event? createdDate [Y/n]: Y
  13. Enter (additional) timestamp events from the query [column-Name, aliasName...] or [abort]: abort
  14. Does the event Users need customizing? [y/N]: N
  15. Do you want to add another Query? [Y/n]: n
  16. Do you want to Generate the files [Y/n]: Y

Module contents