Here are the examples of the python api mock.sentinel.FIELD_NAME taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
8 Examples
3
Example 1
Project: django-natural-query Source File: test_natural_query_descriptor.py
def test_equals_operator_generates_the_right_expression_for_the_exact_lookup_when_comparing_to_another_field(self):
sut = self.system_under_test
expected = Q(field__exact=F(sentinel.FIELD_NAME))
actual = sut == self.field
self.assertEqual(actual, expected)
3
Example 2
Project: django-natural-query Source File: test_natural_query_descriptor.py
def test_greater_than_operator_generates_the_right_expression_for_the_gt_lookup_when_comparing_to_another_field(
self):
sut = self.system_under_test
expected = Q(field__gt=F(sentinel.FIELD_NAME))
actual = sut > self.field
self.assertEqual(actual, expected)
3
Example 3
Project: django-natural-query Source File: test_natural_query_descriptor.py
def test_greater_than_or_equal_operator_generates_the_right_expression_for_the_gte_lookup_when_comparing_to_another_field(
self):
sut = self.system_under_test
expected = Q(field__gte=F(sentinel.FIELD_NAME))
actual = sut >= self.field
self.assertEqual(actual, expected)
3
Example 4
Project: django-natural-query Source File: test_natural_query_descriptor.py
def test_less_than_operator_generates_the_right_expression_for_the_lt_lookup_when_comparing_to_another_field(self):
sut = self.system_under_test
expected = Q(field__lt=F(sentinel.FIELD_NAME))
actual = sut < self.field
self.assertEqual(actual, expected)
3
Example 5
Project: django-natural-query Source File: test_natural_query_descriptor.py
def test_less_than_or_equal_operator_generates_the_right_expression_for_the_lte_lookup_when_comparing_to_another_field(
self):
sut = self.system_under_test
expected = Q(field__lte=F(sentinel.FIELD_NAME))
actual = sut <= self.field
self.assertEqual(actual, expected)
3
Example 6
Project: django-natural-query Source File: test_natural_query_descriptor.py
def test_not_equal_operator_generates_the_right_negated_expression_for_the_exact_lookup_when_comparing_to_another_field(
self):
sut = self.system_under_test
expected = ~Q(field__exact=F(sentinel.FIELD_NAME))
actual = sut != self.field
self.assertEqual(actual, expected)
0
Example 7
@property
def field(self):
return NaturalQueryDescriptor(name=sentinel.FIELD_NAME)
0
Example 8
@property
def field(self):
return Field(name=sentinel.FIELD_NAME)