def get_main_color(self): image_path = os.path.join( Settings.TEST_OUT_IMAGES, self.name, 'screen_{0}.png'.format(int(time.time() * 1000))) self.get_screen(image_path, log_level=logging.DEBUG) result = ImageUtils.get_main_color(image_path) File.delete(path=image_path) return result
def test_03_get_main_color(self): actual_color = ImageUtils.get_main_color(image_path=self.app_image) assert (actual_color == self.white ).all(), 'Main color is wrong. It should be white.'