<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.md', which is part of this source code package.
#

import unittest

from kubernetes.models.v1.Service import Service
from kubernetes.models.v1.ReplicationController import ReplicationController
from kubernetes.models.v1beta1.DaemonSet import DaemonSet
from kubernetes.K8sService import K8sService
from kubernetes.K8sReplicationController import K8sReplicationController

import utils


class CloudNativeCassandraTests(unittest.TestCase):

    def setUp(self):
        utils.cleanup_services()
        utils.cleanup_rc()

    def tearDown(self):
        utils.cleanup_services()
        utils.cleanup_rc()

    def test_cassandra_setup(self):
        svc = Service(model=utils.cassandra_service())
        k8s_service = utils.create_service(name="cassandra")
        k8s_service.model = svc
<commit_msg>tests: update setup/teardown of cassandra<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.md', which is part of this source code package.
#

import unittest

from kubernetes.models.v1.Service import Service
from kubernetes.models.v1.ReplicationController import ReplicationController
from kubernetes.models.v1beta1.DaemonSet import DaemonSet
from kubernetes.K8sService import K8sService
from kubernetes.K8sReplicationController import K8sReplicationController

import utils


class CloudNativeCassandraTests(unittest.TestCase):
    """
    https://github.com/kubernetes/kubernetes/tree/master/examples/storage/cassandra

    Currently incomplete.
    """

    def setUp(self):
        utils.cleanup_services()
        utils.cleanup_rc()
        utils.cleanup_pods()

    def tearDown(self):
        utils.cleanup_services()
        utils.cleanup_rc()
        utils.cleanup_pods()

    def test_cassandra_setup(self):
        svc = Service(model=utils.cassandra_service())
        k8s_service = utils.create_service(name="cassandra")
        k8s_service.model = svc

{'fraction_non_alphanumeric': 0.08662541646834841, 'fraction_numerical': 0.010471204188481676, 'mean_word_length': 3.9458823529411764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7529265', 'n_tokens_mistral': 633, 'n_tokens_neox': 618, 'n_words': 143}