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)
                'loan_end_date',
                'status',
                dependency_conditions.Exact(AssetStatus.loan.id),
                SHOW,
            ),
            Dependency(
                'loan_end_date',
                'status',
                dependency_conditions.Exact(AssetStatus.loan.id),
                'note',
                'status',
                dependency_conditions.Exact(AssetStatus.loan.id),
                SHOW,
            ),

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):
        exact = Exact(5)
        self.assertTrue(exact.met(5))
        self.assertTrue(exact.met("5"))
        self.assertFalse(exact.met(7))
        self.assertFalse(exact.met("3"))
 
    def test_python_condition_date(self):
        exact = Exact(date(2100, 10, 5))
        model_mock_2 = Mock(spec=Model)
        model_mock_2.pk = 55
        exact = Exact(model_mock)
        self.assertTrue(exact.met(model_mock))
        self.assertTrue(exact.met("129"))
    def test_js_format_simple(self):
        exact = Exact(10)
        self.assertEqual(exact.get_js_format(), ["exact", "10"])
 
    def test_js_format_date(self):