Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(9)  |  Derive(0)  |  Import(1)

src/r/a/ralph_assets-HEAD/src/ralph_assets/forms.py   ralph_assets(Download)
                'category',
                dependency_conditions.MemberOf(
                    AssetCategory.objects.filter(is_blade=True).all()
                ),
                SHOW,
                'category',
                dependency_conditions.MemberOf(
                    AssetCategory.objects.filter(is_blade=True).all()
                ),
                REQUIRE,
                'category',
                dependency_conditions.MemberOf(
                    AssetCategory.objects.filter(pk__in=[
                        "1-1-back-office-mobile-devices",
                        "1-1-1-back-office-mobile-devices-mobile-phone",
                'category',
                dependency_conditions.MemberOf(
                    AssetCategory.objects.filter(pk__in=[
                        "1-1-back-office-mobile-devices",
                        "1-1-1-back-office-mobile-devices-mobile-phone",

src/d/j/django-bob-1.6.0/bob/tests/unit/dependencies.py   django-bob(Download)
from django.db.models import Model
 
from bob.forms.dependency_conditions import (
    first_letter_lower,
    format_single_val_for_js,
    def test_python_condition(self):
        memberOf = MemberOf([1, 2, 5, date(2010, 03, 19)])
        self.assertTrue(memberOf.met("2"))
        self.assertTrue(memberOf.met(5))
        self.assertFalse(memberOf.met(3))
        self.assertFalse(memberOf.met(None))
 
    def test_python_condition_date(self):
        memberOf = MemberOf([1, date(2010, 03, 19), 5])
    def test_js_format_simple(self):
        memberOf = MemberOf([1, True, "3"])
        self.assertEqual(
            memberOf.get_js_format(), ["memberOf", ["1", True, "3"]]
        )
 
    def test_js_format_date(self):
        memberOf = MemberOf([1, date(2010, 02, 19), "3"])