import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
    os.environ.setdefault("DJANGO_CONFIGURATION", "Development")

    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)

import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
    os.environ.setdefault("DJANGO_CONFIGURATION", "Development")

    if len(sys.argv) > 1 and sys.argv[1] == 'test':
        os.environ['DJANGO_CONFIGURATION'] = 'Testing'

    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)

Set up test environment when launching tests.
Set up test environment when launching tests.
  import os
  import sys
  
  if __name__ == "__main__":
      os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
      os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
  
+     if len(sys.argv) > 1 and sys.argv[1] == 'test':
+         os.environ['DJANGO_CONFIGURATION'] = 'Testing'
+ 
      from configurations.management import execute_from_command_line
  
      execute_from_command_line(sys.argv)
  
Set up test environment when launching tests.
## Code Before:
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
    os.environ.setdefault("DJANGO_CONFIGURATION", "Development")

    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)

## Instruction:
Set up test environment when launching tests.
## Code After:
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
    os.environ.setdefault("DJANGO_CONFIGURATION", "Development")

    if len(sys.argv) > 1 and sys.argv[1] == 'test':
        os.environ['DJANGO_CONFIGURATION'] = 'Testing'

    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)
