Ejemplo n.º 1
0
 def test_bubble_default_applies_clonofilter_passed_in_through_get(self):
     s = Sample.objects.get()
     cf = ClonoFilter(sample=s)
     cf.save()
     self.request = FakeRequestFactory(GET={'clonofilter': cf.id})
     with patch('clonotypes.views.bubble', bubble_patch):
         (request_echo, clonofilter_echo) = bubble_default(
             self.request, s.id)
         self.assertEqual(cf.id, clonofilter_echo.id)
         self.assertEqual(cf, clonofilter_echo)
Ejemplo n.º 2
0
 def test_bubble_default_creates_a_filter_with_sample(self):
     s = Sample.objects.get()
     with patch('clonotypes.views.bubble', bubble_patch):
         (request, clonofilter) = bubble_default(self.request, s.id)
         self.assertEqual(s, clonofilter.sample)
Ejemplo n.º 3
0
 def test_bubble_default_png_uses_an_empty_filter(self):
     s = Sample.objects.get()
     with patch('clonotypes.views.bubble', bubble_patch):
         (request, clonofilter) = bubble_default(self.request, s.id)
         self.assertEqual(ClonoFilter(), clonofilter)