Пример #1
0
 def test200_920_SadPathTooFewFaces(self):
     expectedResult = {
         'status':
         'error: Incorrect length of faces - must be exactly 6 faces'
     }
     parms = {'op': 'create', 'faces': '12345'}
     actualResult = create._create(parms)
     self.assertDictEqual(expectedResult, actualResult)
Пример #2
0
 def test100_030_HappyPathFacesMissingOverall(self):
     expectedResult = {
         'cube': 'gggggggggyyyyyyyyybbbbbbbbbwwwwwwwwwrrrrrrrrrooooooooo',
         'integrity':
         '763F71B164EF77E6916F1C2CBAEB3B2C3CA9A876AC6A94A97D6B0EF1C489E289',
         'status': 'ok'
     }
     parms = {'op': 'create'}
     actualResult = create._create(parms)
     self.assertDictEqual(expectedResult, actualResult)
Пример #3
0
 def test100_040_HappyPathExtraneousParms(self):
     expectedResult = {
         'cube': 'gggggggggyyyyyyyyybbbbbbbbbwwwwwwwwwrrrrrrrrrooooooooo',
         'integrity':
         '763F71B164EF77E6916F1C2CBAEB3B2C3CA9A876AC6A94A97D6B0EF1C489E289',
         'status': 'ok'
     }
     parms = {'op': 'create', 'f': '123456'}
     actualResult = create._create(parms)
     self.assertDictEqual(expectedResult, actualResult)
Пример #4
0
 def test100_010_HappyPathNominalNumberOfFaces(self):
     expectedResult = {
         'cube': '111111111222222222333333333444444444555555555666666666',
         'integrity':
         '88D897BD22E132D21A538745E63995B07D7C52CE9617A0979520545753EE0DED',
         'status': 'ok'
     }
     parms = {'op': 'create', 'faces': '123456'}
     actualResult = create._create(parms)
     self.assertDictEqual(expectedResult, actualResult)
Пример #5
0
 def test100_930_SadPathDuplicateFaceValue(self):
     expectedResult = {'status': 'error: No duplicate faces are allowed'}
     parms = {'op': 'create', 'faces': '112345'}
     actualResult = create._create(parms)
     self.assertDictEqual(expectedResult, actualResult)
Пример #6
0
 def test900_030_TooFewItemsInFaces(self):
     expectedResult = {'status': 'error: Incorrect length for faces'}
     parms = {'op': 'create', 'faces' : '12345'}
     actualResult = create._create(parms)
     self.assertDictEqual(expectedResult, actualResult)
Пример #7
0
 def test900_020_DuplicateItemInFaces(self):
     expectedResult = {'status': 'error: Duplicate Faces'}
     parms = {'op': 'create', 'faces' : '123455'}
     actualResult = create._create(parms)
     self.assertDictEqual(expectedResult, actualResult)
Пример #8
0
 def test900_010_IncorrectLengthForFaces(self):
     expectedResult = {'status': 'error: Incorrect length for faces'}
     parms = {'op': 'create', 'faces' : '1234567'}
     actualResult = create._create(parms)
     self.assertDictEqual(expectedResult, actualResult) 
Пример #9
0
 def test100_020_NoValueSpecifiedForFaces(self):
     expectedResult = {'cube': 'gggggggggyyyyyyyyybbbbbbbbbwwwwwwwwwrrrrrrrrrooooooooo', 'integrity': '763F71B164EF77E6916F1C2CBAEB3B2C3CA9A876AC6A94A97D6B0EF1C489E289', 'status':'ok'}
     parms = {'op': 'create', 'faces' : None}
     actualResult = create._create(parms)
     self.assertDictEqual(expectedResult, actualResult)