forked from SAW-NAAZ/PythonJenkins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
committed
Jul 15, 2021
0 parents
commit 7e24a1f
Showing
5 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class account: | ||
def check_password_length(self, password): | ||
if len(password) > 8: | ||
return True | ||
else: | ||
return False | ||
|
||
if __name__ == '__main__': | ||
accVerify = account() | ||
print('The password length is ' + str(accVerify.check_password_length('offtoschool'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import unittest | ||
import account as AccountClass | ||
|
||
class Test(unittest.TestCase): | ||
accInfo = AccountClass.account() | ||
|
||
def test_check_password_length(self): | ||
print("Checking possible passwords\n") | ||
passwordList = [ 'abeautifulday', 'astrictboss', 'alovelyhouse' ] | ||
|
||
for passwd in passwordList: | ||
print("Checking password " + passwd + "\n") | ||
passInfo = self.accInfo.check_password_length(passwd) | ||
self.assertTrue(passInfo) | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
curl -s 'http://localhost:8080/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)' -u admin:admin | ||
|
||
curl -s -XPOST 'http://localhost:8080/createItem?name=python-project-new' -u admin:admin --data-binary @config.xml -H "Jenkins-Crumb:384576fea44a8984fd1afe2474c8e951" -H "Content-Type:text/xml" | ||
|
||
curl -s -XPOST 'http://localhost:8080/reload' -u admin:admin -H "Jenkins-Crumb:aacc27914e1ef26b82e8930ec44ce944" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<publishers> | ||
<hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup@0.34"> | ||
<patterns class="empty-list"/> | ||
<deleteDirs>true</deleteDirs> | ||
<skipWhenFailed>false</skipWhenFailed> | ||
<cleanWhenSuccess>true</cleanWhenSuccess> | ||
<cleanWhenUnstable>true</cleanWhenUnstable> | ||
<cleanWhenFailure>true</cleanWhenFailure> | ||
<cleanWhenNotBuilt>true</cleanWhenNotBuilt> | ||
<cleanWhenAborted>true</cleanWhenAborted> | ||
<notFailBuild>false</notFailBuild> | ||
<cleanupMatrixParent>false</cleanupMatrixParent> | ||
<externalDelete></externalDelete> | ||
</hudson.plugins.ws__cleanup.WsCleanup> |