Esempio n. 1
0
 def test_should_return_true_when_invoking_is_applicable_with_environments_and_initializer_defines_environment(
         self):
     initializer = Initializer("initialzer", self.callable,
                               "any_environment")
     self.assertTrue(
         initializer.is_applicable(
             ["any_environment", "any_other_environment"]))
Esempio n. 2
0
 def test_should_return_false_when_invoking_is_applicable_without_environment_and_initializer_defines_environment(
         self):
     initializer = Initializer("initialzer", self.callable,
                               "any_environment")
     self.assertFalse(initializer.is_applicable())
Esempio n. 3
0
 def test_should_return_true_when_invoking_is_applicable_with_environment_and_initializer_does_not_define_environments(
         self):
     initializer = Initializer("initialzer", self.callable)
     self.assertTrue(initializer.is_applicable("any_environment"))
Esempio n. 4
0
 def test_should_return_true_when_invoking_is_applicable_with_environment_and_initializer_defines_multiple_environments(
         self):
     initializer = Initializer(
         "initialzer", self.callable, ["any_environment", "any_other_environment"])
     self.assertTrue(initializer.is_applicable(["any_environment"]))
Esempio n. 5
0
 def test_should_return_false_when_invoking_is_applicable_without_environment_and_initializer_defines_environment(
         self):
     initializer = Initializer(
         "initialzer", self.callable, "any_environment")
     self.assertFalse(initializer.is_applicable())
Esempio n. 6
0
 def test_should_return_true_when_invoking_is_applicable_with_environment_and_initializer_does_not_define_environments(
         self):
     initializer = Initializer("initialzer", self.callable)
     self.assertTrue(initializer.is_applicable("any_environment"))