Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Fix python tests runner
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisbcc committed Dec 10, 2021
1 parent 94f63f5 commit f88e5bd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/snippet-testing/language_handler/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ def self.run_before_test(directory)
end

private

def text_with_custom_header(file_content)
cert_path = ENV['FAKE_CERT_PATH']
file_content.prepend(
"import twilio.rest.resources.base\n"\
"import sys\n"\
"twilio.rest.resources.base.get_cert_file = lambda: '#{cert_path}'\n"\
"sys.modules['twilio.rest.base.resources'] = twilio.rest.resources.base\n"
)
end
def execute_command(file)
command = bash_string_command(
'source /usr/local/bin/virtualenvwrapper.sh &&'\
Expand Down

0 comments on commit f88e5bd

Please sign in to comment.