Beispiel #1
0
 def test_values_cannot_be_dictionaries(self):
     assert_that(value_is_valid({'thing': 'I am a thing'}), is_(False))
Beispiel #2
0
 def test_values_can_be_mongo_objectids(self):
     assert_that(value_is_valid(bson.ObjectId()), is_(True))
Beispiel #3
0
 def test_values_cannot_be_arrays(self):
     assert_that(value_is_valid([1, 2, 3, 4]), is_(False))
Beispiel #4
0
 def test_string_values_can_strings(self):
     assert_that(value_is_valid(u"1257"), is_(True))
     assert_that(value_is_valid("1257"), is_(True))
Beispiel #5
0
 def test_values_can_be_boolean(self):
     assert_that(value_is_valid(True), is_(True))
     assert_that(value_is_valid(False), is_(True))
Beispiel #6
0
 def test_values_can_be_integers(self):
     assert_that(value_is_valid(1257), is_(True))
Beispiel #7
0
 def test_values_can_be_floats(self):
     assert_that(value_is_valid(123.321), is_(True))
 def test_values_cannot_be_arrays(self):
     assert_that(value_is_valid([1, 2, 3, 4]), is_(False))
 def test_values_cannot_be_dictionaries(self):
     assert_that(value_is_valid({'thing': 'I am a thing'}), is_(False))
 def test_values_can_be_mongo_objectids(self):
     assert_that(value_is_valid(bson.ObjectId()), is_(True))
 def test_values_can_be_boolean(self):
     assert_that(value_is_valid(True), is_(True))
     assert_that(value_is_valid(False), is_(True))
 def test_string_values_can_strings(self):
     assert_that(value_is_valid(u"1257"), is_(True))
     assert_that(value_is_valid("1257"), is_(True))
 def test_values_can_be_floats(self):
     assert_that(value_is_valid(123.321), is_(True))
 def test_values_can_be_integers(self):
     assert_that(value_is_valid(1257), is_(True))