コード例 #1
0
 def test_compare_md5s_no_change(self):
     """should add key to changed"""
     s3d = Deploy(self.site, self.config)
     s3d.new_md5s["foo"] = 1
     s3d.old_md5s["foo"] = 1
     s3d.compare_md5s()
     self.assertEqual(len(s3d.changed), 0)
コード例 #2
0
 def test_compare_md5s_changed(self):
     """should add key to changed"""
     s3d = Deploy(self.site, self.config)
     s3d.new_md5s["foo"] = 1
     s3d.old_md5s["foo"] = 2
     s3d.compare_md5s()
     self.assertEquals(s3d.changed[0], "foo")
コード例 #3
0
 def test_compare_md5s_no_change(self):
     """should add key to changed"""
     s3d = Deploy(self.site, self.config)
     s3d.new_md5s["foo"] = 1
     s3d.old_md5s["foo"] = 1
     s3d.compare_md5s()
     self.assertEquals(len(s3d.changed), 0)
コード例 #4
0
 def test_should_upload(self):
     """should_upload should return True"""
     s3d = Deploy(self.site, self.config)
     s3d.skip_upload = ["foo", "bar"]
     s3d.changed = ["asdf/foo", "bazbaz/zap"]
     self.assertTrue(s3d.should_upload)
コード例 #5
0
 def test_should_upload_skip(self):
     """should skip uploading"""
     s3d = Deploy(self.site, self.config)
     s3d.skip_upload = ["/foo/foo", "bar"]
     s3d.changed = ["/foo/foo"]
     self.assertFalse(s3d.should_upload)
コード例 #6
0
 def test_should_upload(self):
     """should_upload should return True"""
     s3d = Deploy(self.site, self.config)
     s3d.skip_upload = ["foo", "bar"]
     s3d.changed = ["asdf/foo", "bazbaz/zap"]
     self.assertTrue(s3d.should_upload)
コード例 #7
0
 def test_should_upload_skip(self):
     """should skip uploading"""
     s3d = Deploy(self.site, self.config)
     s3d.skip_upload = ["/foo/foo", "bar"]
     s3d.changed = ["/foo/foo"]
     self.assertFalse(s3d.should_upload)
コード例 #8
0
 def test_compare_md5s_not_found(self):
     """should add key to changed"""
     s3d = Deploy(self.site, self.config)
     s3d.new_md5s["foo"] = 1
     s3d.compare_md5s()
     self.assertEquals(s3d.changed[0], "foo")