Did I find the right examples for you? yes no

All Samples(8)  |  Call(5)  |  Derive(0)  |  Import(3)

src/d/j/django-fixtureless-HEAD/fixtureless/factory.py   django-fixtureless(Download)
from fixtureless import exceptions
from fixtureless.generator import create_instance
from fixtureless.utils import list_get
 
 
    def _handle_second_arg(self, *args):
        sec_arg = list_get(args, 1)
        count = 1
        kwargs = None
        if isinstance(sec_arg, int):

src/d/j/django-fixtureless-1.2.0/fixtureless/factory.py   django-fixtureless(Download)
from fixtureless import exceptions
from fixtureless.generator import create_instance
from fixtureless.utils import list_get
 
 
    def _handle_second_arg(self, *args):
        sec_arg = list_get(args, 1)
        count = 1
        kwargs = None
        if isinstance(sec_arg, int):

src/d/j/django-fixtureless-HEAD/fixtureless/tests/test_django_project/test_django_project/test_app/tests/utils.py   django-fixtureless(Download)
from django.test import TestCase
 
from fixtureless.utils import list_get
 
 
class ListGetTest(TestCase):
    def test_list_get(self):
        array = list()
        index = 0
        val = list_get(array, index)
        self.assertIsNone(val)
 
        val = list_get(array, index, 'test')
        self.assertEqual(val, 'test')
 
        array = [1, 2]
        val = list_get(array, index)