Commit b25e3e3a authored by Łukasz Nowak's avatar Łukasz Nowak

promise: check_surykatka_json is testless

Result of the promise is not important for instantiation.
parent 6a8f4002
...@@ -29,6 +29,8 @@ class RunPromise(GenericPromise): ...@@ -29,6 +29,8 @@ class RunPromise(GenericPromise):
self.result_count = self.failure_amount self.result_count = self.failure_amount
self.error_list = [] self.error_list = []
self.info_list = [] self.info_list = []
# Make promise test-less, as it's result is not important for instantiation
self.setTestLess()
def appendErrorMessage(self, message): def appendErrorMessage(self, message):
self.error_list.append(message) self.error_list.append(message)
......
...@@ -46,7 +46,7 @@ class CheckSurykatkaJSONMixin(TestPromisePluginMixin): ...@@ -46,7 +46,7 @@ class CheckSurykatkaJSONMixin(TestPromisePluginMixin):
class TestCheckSurykatkaJSON(CheckSurykatkaJSONMixin): class TestCheckSurykatkaJSON(CheckSurykatkaJSONMixin):
def test_no_config(self): def test_no_config(self):
self.writeSurykatkaPromise() self.writeSurykatkaPromise()
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -55,7 +55,7 @@ class TestCheckSurykatkaJSON(CheckSurykatkaJSONMixin): ...@@ -55,7 +55,7 @@ class TestCheckSurykatkaJSON(CheckSurykatkaJSONMixin):
def test_not_existing_file(self): def test_not_existing_file(self):
self.writeSurykatkaPromise({'json-file': self.json_file}) self.writeSurykatkaPromise({'json-file': self.json_file})
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -65,7 +65,7 @@ class TestCheckSurykatkaJSON(CheckSurykatkaJSONMixin): ...@@ -65,7 +65,7 @@ class TestCheckSurykatkaJSON(CheckSurykatkaJSONMixin):
def test_empty_file(self): def test_empty_file(self):
self.writeSurykatkaPromise({'json-file': self.json_file}) self.writeSurykatkaPromise({'json-file': self.json_file})
self.writeSurykatkaJson('') self.writeSurykatkaJson('')
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -84,7 +84,7 @@ class TestCheckSurykatkaJSONUnknownReport(CheckSurykatkaJSONMixin): ...@@ -84,7 +84,7 @@ class TestCheckSurykatkaJSONUnknownReport(CheckSurykatkaJSONMixin):
self.writeSurykatkaJson("""{ self.writeSurykatkaJson("""{
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -110,7 +110,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin): ...@@ -110,7 +110,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
self.launcher.run() self.launcher.run()
self.assertPassedMessage( self.assertPassedMessage(
self.getPromiseResult(self.promise_name), self.getPromiseResult(self.promise_name),
...@@ -135,7 +135,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin): ...@@ -135,7 +135,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -161,7 +161,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin): ...@@ -161,7 +161,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -180,7 +180,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin): ...@@ -180,7 +180,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin):
self.writeSurykatkaJson("""{ self.writeSurykatkaJson("""{
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -198,7 +198,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin): ...@@ -198,7 +198,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin):
"bot_status": [] "bot_status": []
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -255,7 +255,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -255,7 +255,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
self.launcher.run() self.launcher.run()
self.assertPassedMessage( self.assertPassedMessage(
self.getPromiseResult(self.promise_name), self.getPromiseResult(self.promise_name),
...@@ -317,7 +317,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -317,7 +317,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
self.launcher.run() self.launcher.run()
self.assertPassedMessage( self.assertPassedMessage(
self.getPromiseResult(self.promise_name), self.getPromiseResult(self.promise_name),
...@@ -382,7 +382,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -382,7 +382,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -444,7 +444,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -444,7 +444,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
self.launcher.run() self.launcher.run()
self.assertPassedMessage( self.assertPassedMessage(
self.getPromiseResult(self.promise_name), self.getPromiseResult(self.promise_name),
...@@ -490,7 +490,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -490,7 +490,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
self.launcher.run() self.launcher.run()
self.assertPassedMessage( self.assertPassedMessage(
self.getPromiseResult(self.promise_name), self.getPromiseResult(self.promise_name),
...@@ -545,7 +545,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -545,7 +545,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
self.launcher.run() self.launcher.run()
self.assertPassedMessage( self.assertPassedMessage(
self.getPromiseResult(self.promise_name), self.getPromiseResult(self.promise_name),
...@@ -585,7 +585,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -585,7 +585,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -632,7 +632,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -632,7 +632,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -675,7 +675,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -675,7 +675,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -732,7 +732,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -732,7 +732,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -778,7 +778,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -778,7 +778,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""" % status_code) """ % status_code)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -849,7 +849,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -849,7 +849,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -909,7 +909,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -909,7 +909,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
...@@ -963,7 +963,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin): ...@@ -963,7 +963,7 @@ class TestCheckSurykatkaJSONHttpQuery(CheckSurykatkaJSONMixin):
] ]
} }
""") """)
self.configureLauncher() self.configureLauncher(enable_anomaly=True)
with self.assertRaises(PromiseError): with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
self.assertFailedMessage( self.assertFailedMessage(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment