Esempio n. 1
0
 def test_timestamp_in_collection_document(self):
     self.td.created_date = self._
     expected = Cache()
     expected.add("created_date", self._)
     self.assertEqual(expected, self.td._data)
Esempio n. 2
0
 def test_string_in_collection_document(self):
     self.sd.name = "Whosand"
     expecting = Cache()
     expecting.add("name", "Whosand")
     self.assertEqual(expecting, self.sd._data)
Esempio n. 3
0
 def test_array_in_collection_document(self):
     self.ad.children_ages = self._
     cache = Cache()
     cache.add("children_ages", self._)
     self.assertEqual(self.ad._data, cache)
Esempio n. 4
0
 def test_float_in_document(self):
     self.fd.percentage = 50.0
     expected = Cache()
     expected.add("percentage", 50.0)
     self.assertEqual(expected, self.fd._data)
Esempio n. 5
0
 def test_integer_in_collection_document(self):
     self.id.age = 5
     expected = Cache()
     expected.add("age", 5)
     self.assertEqual(expected, self.id._data)
    def test_cache(self):
        cache = Cache()
        cache.name = MOUTHFUL
        self.assertEqual(cache.name, MOUTHFUL)

        self.assertLessEqual({"_pk": False}.items(), cache.items())
Esempio n. 7
0
 def test_boolean_in_document_instance(self):
     self.bd.is_verified = True
     expected = Cache()
     expected.add("is_verified", True)
     self.assertEqual(expected, self.bd._data)