|
1 | | -# -*- coding: utf-8 -*- |
2 | | -# |
3 | | -# opc_diag_steps.py |
4 | | -# |
5 | | -# Copyright (C) 2012, 2013 Steve Canny [email protected] |
6 | | -# |
7 | | -# This module is part of opc-diag and is released under the MIT License: |
8 | | -# http://www.opensource.org/licenses/mit-license.php |
| 1 | +# encoding: utf-8 |
9 | 2 |
|
10 | | -"""Acceptance test steps for opc-diag package.""" |
| 3 | +""" |
| 4 | +Acceptance test steps for opc-diag package |
| 5 | +""" |
11 | 6 |
|
12 | 7 | import os |
13 | 8 | import shutil |
|
18 | 13 | assertManifestsMatch, assertPackagesMatch, OpcCommand, ref_pkg_path, |
19 | 14 | scratch_path |
20 | 15 | ) |
21 | | -from step_data import Manifest |
| 16 | +from step_data import Manifest, _Manifest |
22 | 17 |
|
23 | 18 |
|
24 | 19 | SUBCMD_BROWSE = 'browse' |
@@ -166,7 +161,85 @@ def step_then_pkg_diff_appears_on_stdout(context): |
166 | 161 | def step_then_pkg_appears_in_target_dir(context): |
167 | 162 | context.cmd.assert_stderr_empty() |
168 | 163 | context.cmd.assert_stdout_empty() |
169 | | - assertPackagesMatch(base_pkg_path, extract_dir) |
| 164 | + actual_manifest = Manifest(extract_dir) |
| 165 | + expected_sha1_list = [ |
| 166 | + ('b7377d13b945fd27216d02d50277a350c8c4aea6', |
| 167 | + '[Content_Types].xml'), |
| 168 | + ('11a0facc96d560bf07b4691f0526b09229264e20', |
| 169 | + '_rels/.rels'), |
| 170 | + ('c1ae3715531e49808610f18c4810704f70be3767', |
| 171 | + 'docProps/app.xml'), |
| 172 | + ('775edccda43956b1e55c8fe668ba817934ee17c8', |
| 173 | + 'docProps/core.xml'), |
| 174 | + ('585be5da0832f70b4e71f66f5784cc8acbcc8e88', |
| 175 | + 'docProps/thumbnail.jpeg'), |
| 176 | + ('85ff3c93403fee9d07d1f52b08e03e1ad8614343', |
| 177 | + 'ppt/_rels/presentation.xml.rels'), |
| 178 | + ('21bbd2e84efc65591a76e8a7811c79ce65a7f389', |
| 179 | + 'ppt/presProps.xml'), |
| 180 | + ('8281415d72c1f9f43e2e0b1cdc4a346e7a0545b3', |
| 181 | + 'ppt/presentation.xml'), |
| 182 | + ('b0feb4cc107c9b2d135b1940560cf8f045ffb746', |
| 183 | + 'ppt/printerSettings/printerSettings1.bin'), |
| 184 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 185 | + 'ppt/slideLayouts/_rels/slideLayout1.xml.rels'), |
| 186 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 187 | + 'ppt/slideLayouts/_rels/slideLayout10.xml.rels'), |
| 188 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 189 | + 'ppt/slideLayouts/_rels/slideLayout11.xml.rels'), |
| 190 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 191 | + 'ppt/slideLayouts/_rels/slideLayout2.xml.rels'), |
| 192 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 193 | + 'ppt/slideLayouts/_rels/slideLayout3.xml.rels'), |
| 194 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 195 | + 'ppt/slideLayouts/_rels/slideLayout4.xml.rels'), |
| 196 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 197 | + 'ppt/slideLayouts/_rels/slideLayout5.xml.rels'), |
| 198 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 199 | + 'ppt/slideLayouts/_rels/slideLayout6.xml.rels'), |
| 200 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 201 | + 'ppt/slideLayouts/_rels/slideLayout7.xml.rels'), |
| 202 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 203 | + 'ppt/slideLayouts/_rels/slideLayout8.xml.rels'), |
| 204 | + ('fbccb1d0db1ad72bea6b96449d5033ee7ad3ee3c', |
| 205 | + 'ppt/slideLayouts/_rels/slideLayout9.xml.rels'), |
| 206 | + ('ec99dfcf6812f8bd0c9e0a2363d38301e8104803', |
| 207 | + 'ppt/slideLayouts/slideLayout1.xml'), |
| 208 | + ('8fa04dcb314de8c2321eaec153e6b85263c52fd8', |
| 209 | + 'ppt/slideLayouts/slideLayout10.xml'), |
| 210 | + ('7531300ef5c76a217f330d3748c82ce484bcb037', |
| 211 | + 'ppt/slideLayouts/slideLayout11.xml'), |
| 212 | + ('7fba92ff7c76a5050fd9c0acbbdc98600def0264', |
| 213 | + 'ppt/slideLayouts/slideLayout2.xml'), |
| 214 | + ('ca2c475ce40be637eb271846fbcee05121d61054', |
| 215 | + 'ppt/slideLayouts/slideLayout3.xml'), |
| 216 | + ('4ceb2a6391cc08f6883515ecfb117dfe6733daae', |
| 217 | + 'ppt/slideLayouts/slideLayout4.xml'), |
| 218 | + ('4764ea1d5afd93497b4e3bf665cd5b09f6684f62', |
| 219 | + 'ppt/slideLayouts/slideLayout5.xml'), |
| 220 | + ('3768f6b561eecdfb4530c6a2a939ed4e822f07f5', |
| 221 | + 'ppt/slideLayouts/slideLayout6.xml'), |
| 222 | + ('ef830f1b546e799c3ae5a8c3df399d5e3346e70a', |
| 223 | + 'ppt/slideLayouts/slideLayout7.xml'), |
| 224 | + ('749ba47dc5497c6bd0d8b0b034e648e47c336491', |
| 225 | + 'ppt/slideLayouts/slideLayout8.xml'), |
| 226 | + ('d49c31a3ba055792ca9dd779bb8897795aa46fff', |
| 227 | + 'ppt/slideLayouts/slideLayout9.xml'), |
| 228 | + ('4b0a95fbb9e8680c1e766d0ab7080bd854a3f7bc', |
| 229 | + 'ppt/slideMasters/_rels/slideMaster1.xml.rels'), |
| 230 | + ('477117c4c1f2189edcfd35a194103bf4fc1245d5', |
| 231 | + 'ppt/slideMasters/slideMaster1.xml'), |
| 232 | + ('27bb16052608af395a606ce1de16239bef2d86c3', |
| 233 | + 'ppt/tableStyles.xml'), |
| 234 | + ('ea60a5ff9290d9ec08a1546fc38945afb3057226', |
| 235 | + 'ppt/theme/theme1.xml'), |
| 236 | + ('5df90b0fdcd12c199b36ae1cd36e7541ab14ed90', |
| 237 | + 'ppt/viewProps.xml'), |
| 238 | + ] |
| 239 | + expected_manifest = _Manifest(expected_sha1_list) |
| 240 | + assertManifestsMatch( |
| 241 | + actual_manifest, expected_manifest, 'actual', 'expected' |
| 242 | + ) |
170 | 243 |
|
171 | 244 |
|
172 | 245 | @then('the package rels diff appears on stdout') |
|
0 commit comments