Commits

Jean-Tiare Le Bigot  committed ca618d1

fix tests

  • Participants
  • Parent commits ec754f9

Comments (0)

Files changed (1)

File dynamodb_mapper/tests/test_model.py

             "_aws_secret_access_key": None,
             "_region": None,
             "_connection": None,
+            "_tables_cache": {},
         }
 
     def tearDown(self):
             "_aws_secret_access_key": None,
             "_region": None,
             "_connection": None,
+            "_tables_cache": {},
         }
 
     def test_borgness(self):
         self.assertEqual(DATA[1][u'id'], res[1].id)
         self.assertEqual(DATA[1][u'name'], res[1].name)
 
-    @mock.patch("dynamodb_mapper.model.boto")
-    def test_get_batch_hash_range_key(self, m_boto):
+    @mock.patch("dynamodb_mapper.model.ConnectionBorg")
+    def test_get_batch_hash_range_key(self, m_borg):
         KEYS = [(1, u"The level with cute cats"),
                 (2, u"The level with horrible monsters")]
         DATA = [{
                     u"world": u"Hell",
                 }]
 
-        m_table = m_boto.connect_dynamodb.return_value.get_table.return_value
+        m_table = m_borg.return_value.get_table.return_value
         m_table.batch_get_item.return_value = DATA
 
         res = DoomMap.get_batch(KEYS)