Exemplo n.º 1
0
 def get_context_data(self, request):
     context = {}
     environment_id = self.tab_group.kwargs['environment_id']
     context['environment_id'] = environment_id
     d3_data = api.load_environment_data(self.request, environment_id)
     context['d3_data'] = d3_data
     return context
Exemplo n.º 2
0
 def get_context_data(self, request):
     context = {}
     environment_id = self.tab_group.kwargs['environment_id']
     context['environment_id'] = environment_id
     d3_data = api.load_environment_data(self.request, environment_id)
     context['d3_data'] = d3_data
     return context
Exemplo n.º 3
0
 def test_load_environment_data(self, mock_env_get, mock_env_info,
                                mock_dump):
     mock_env_info.return_value = 'services/_environment_info.html'
     mock_dump.return_value = self.env_id
     result = env_api.load_environment_data(self.mock_request, self.env_id)
     self.assertTrue(mock_env_get.called)
     self.assertEqual(self.env_id, result)
     self.assertTrue(mock_dump.called)
Exemplo n.º 4
0
 def test_load_environment_data(self, mock_env_get,
                                mock_env_info, mock_dump):
     mock_env_info.return_value = 'services/_environment_info.html'
     mock_dump.return_value = self.env_id
     result = env_api.load_environment_data(self.mock_request, self.env_id)
     self.assertTrue(mock_env_get.called)
     self.assertEqual(self.env_id, result)
     self.assertTrue(mock_dump.called)
Exemplo n.º 5
0
 def get(request, **kwargs):
     data = api.load_environment_data(request, kwargs['environment_id'])
     return http.HttpResponse(data, content_type='application/json')
Exemplo n.º 6
0
 def get(request, **kwargs):
     data = api.load_environment_data(request, kwargs['environment_id'])
     return http.HttpResponse(data, content_type='application/json')