Exemple #1
0
 def test_compare_should_pass_samples_to_template_via_context(self):
     mock_response = compare(self.request, self.comparison.id)
     self.assertEqual(self.comparison.get_samples(
     ), mock_response.get('samples'))
Exemple #2
0
 def test_compare_sends_shared_amino_acids_and_related_clonotypes(self):
     mock_response = compare(self.request, self.comparison.id)
     shared_amino_acids = self.comparison.get_shared_amino_acids_related()
     self.assertEquals(
         shared_amino_acids, mock_response.get('shared_amino_acids'))
Exemple #3
0
 def test_compare_renders_compare_html_template(self):
     mock_response = compare(self.request, self.comparison.id)
     self.assertEqual('compare.html', mock_response.get('template'))
Exemple #4
0
 def test_compare_returns_ajax_view_if_request_is_ajax(self):
     self.request.is_ajax = lambda: True
     mock_response = compare(self.request, self.comparison.id)
     self.assertEqual('compare_ajax.html', mock_response.get('template'))
Exemple #5
0
 def test_compare_view_passes_comparison_instance_to_template_via_context(self):
     mock_response = compare(self.request, self.comparison.id)
     self.assertEqual(self.comparison, mock_response.get('comparison'))