コード例 #1
0
ファイル: test_rest.py プロジェクト: crs4/ACTIVE
 def setUp(self):
     """
     Method used to setup the test database
     """
     # create a new user
     user  = User.objects.create_user('root', '*****@*****.**', 'root')
     user.is_superuser = True
     user.save()
     token = Token.objects.create(user=user)
     # create a new Plugin
     plugin = Plugin()
     plugin.title = 'My test plugin'
     plugin.description = ''
     plugin.active_version = '1.0.0'
     plugin.plugin_version = '1.0.0'
     plugin.url_info = 'http://active.crs4.it'
     plugin.authors  = 'John Doe'
     plugin.save()
     # create a new Script
     script = Script()
     script.title = 'Test script for image items'
     script.details = ''
     script.path = 'mytestplugin.utils.script1'
     script.job_name = 'job_manager.job.job.PlainJob'
     script.plugin = plugin
     script.item_type = 'image'
     script.save()
コード例 #2
0
ファイル: test_rest.py プロジェクト: crs4/ACTIVE
 def setUp(self):
     """
     Method used to setup the test database
     """
     # create a new user
     user  = User.objects.create_user('root', '*****@*****.**', 'root')
     user.is_superuser = True
     user.save()
     token = Token.objects.create(user=user)
     # create a new Plugin
     plugin = Plugin()
     plugin.name = 'My test plugin'
     plugin.description = 'image'
     plugin.active_version = '1.0.0'
     plugin.plugin_version = '1.0.0'
     plugin.url_info = 'http://active.crs4.it'
     plugin.authors  = 'John Doe'
     plugin.save()