CoreFiles by mySites.guru
generate_fixtures.py53 lines, 1,349 bytes, from Joomla_6.1.3-rc1-Release_Candidate-Full_Package.zip
Raw History Compare with 6.1.2-rc3
md5
514e0e22f7f240dc7c8fa2e5b6c3d053
sha1
33b4c6c0cd8af71923dadf29c0ff46de51803649
sha256
65dc44dfa5c32e78b2702298ea9e7f08bfdce9180670d155a765858233ad8827
# For instructions on using this script, please see the README.

from unittest import mock
import shutil
import glob
import os

from fixtures import (
    Simple,
    AttackRollback,
    Delegated,
    HashedBins,
    NestedDelegated,
    NestedDelegatedErrors,
    ThresholdTwo,
    TerminatingDelegation,
    TopLevelTerminating,
    NestedTerminatingNonDelegatingDelegation,
    ThreeLevelDelegation,
    PublishedTwice,
    TargetsLengthNoSnapshotLength
)


@mock.patch('time.time', mock.MagicMock(return_value=1577836800))
def generate_fixtures():
    Simple.build()
    AttackRollback.build()
    Delegated.build()
    HashedBins.build()
    NestedDelegated.build()
    NestedDelegatedErrors.build()
    ThresholdTwo.build()
    TerminatingDelegation.build()
    TopLevelTerminating.build()
    NestedTerminatingNonDelegatingDelegation.build()
    ThreeLevelDelegation.build()
    PublishedTwice.build()
    PublishedTwice.build(rotate_keys='timestamp')
    PublishedTwice.build(rotate_keys='snapshot')
    TargetsLengthNoSnapshotLength.build()


# Remove all previous fixtures.
for f in glob.glob("fixtures/**/client"):
    shutil.rmtree(f)
for f in glob.glob("fixtures/**/server"):
    shutil.rmtree(f)
# Delete hash files to ensure they are generated again.
for f in glob.glob("fixtures/**/hash.txt"):
    os.remove(f)
generate_fixtures()

The same content is in 136 releases, Joomla 5.1.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.