def get_form(self, *args, **kwargs): fusion = Fusion() fusion.then = Image.objects.get(id=self.kwargs.get('thenid')) #pylint: disable-msg=E1101 flickrid = self.kwargs.get('flickrid') now = imagefromflickrid(flickrid, self.request.user) fusion.now = now fusion.user = self.request.user self.object = fusion form = super(FusionCreateView, self).get_form(*args, **kwargs) return form
def test_empty_point_list(self): """Tests that point_list returns a valid list of lists""" fusion = Fusion() fusion.points = "" self.failUnlessEqual(fusion.point_list(), [])
def test_point_list(self): """Tests that point_list returns a valid list of lists""" fusion = Fusion() fusion.points = "1,2,3,4,5,6,7,8" self.failUnlessEqual(fusion.point_list(), [[1,2,3,4],[5,6,7,8]])
def test_point_list(self): """Tests that point_list returns a valid list of lists""" fusion = Fusion() fusion.points = "1,2,3,4,5,6,7,8" self.failUnlessEqual(fusion.point_list(), [[1, 2, 3, 4], [5, 6, 7, 8]])