
import os, sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

from django.core.management import call_command

if __name__ == "__main__":
    args = sys.argv[1:]
    call_command("test", *args, verbosity=2)


import os, sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

if __name__ == "__main__":
    from django.core.management import execute_from_command_line

    args = sys.argv
    args.insert(1, "test")
    args.insert(2, "pg_uuid_fields")

    execute_from_command_line(args)

Fix tests to run with django 1.7
Fix tests to run with django 1.7

  
  import os, sys
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
  
+ if __name__ == "__main__":
- from django.core.management import call_command
+     from django.core.management import execute_from_command_line
  
- if __name__ == "__main__":
-     args = sys.argv[1:]
+     args = sys.argv
-     call_command("test", *args, verbosity=2)
+     args.insert(1, "test")
+     args.insert(2, "pg_uuid_fields")
  
+     execute_from_command_line(args)
+ 
Fix tests to run with django 1.7
## Code Before:

import os, sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

from django.core.management import call_command

if __name__ == "__main__":
    args = sys.argv[1:]
    call_command("test", *args, verbosity=2)

## Instruction:
Fix tests to run with django 1.7
## Code After:

import os, sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

if __name__ == "__main__":
    from django.core.management import execute_from_command_line

    args = sys.argv
    args.insert(1, "test")
    args.insert(2, "pg_uuid_fields")

    execute_from_command_line(args)
