def testGetApplicable(self):
        # First we will test a object that has not been placed in a position
        # yet, but a position does allow its content type (samplePosition)
        positions = Position.objects.get_applicable(self.text1)
        
        self.assertEqual(len(positions), 1)
        self.assertEqual(positions[0], self.samplePosition)
        
        # Next we will add text2 to samplePositions and return its applicable 
        # positions, which by default, should return none
        Position.objects.add_object(self.samplePosition, self.text2)
        positions = Position.objects.get_applicable(self.text2)
        
        self.assertEqual(len(positions), 0)
        
        # Last test will specify return_all=True, to return all the positions 
        # for text2, this should return all the positions and the positions
        # it is currently in.
        positions = Position.objects.get_applicable(self.text2, return_all=True)
        
        self.assertEqual(len(positions), 1)
        self.assertEqual(positions[0], self.samplePosition)
Enable margins for this layout.
dataset/ETHPy150Open callowayproject/django-kamasutra/positions/tests.py/PositionsTestCase.testGetApplicable--crossover with--dataset/ETHPy150Open rwl/muntjac/muntjac/ui/layout.py/IMarginHandler.setMargin