Python hamcrest.not_() Examples
The following are 13
code examples of hamcrest.not_().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
hamcrest
, or try the search function
.
Example #1
Source File: device_skill_manifest.py From selene-backend with GNU Affero General Public License v3.0 | 5 votes |
def get_updated_skill_manifest(context): device_skill_repo = DeviceSkillRepository(context.db) skill_manifest = device_skill_repo.get_skill_manifest_for_device( context.device_id ) assert_that(len(skill_manifest), equal_to(1)) manifest_skill = skill_manifest[0] assert_that(manifest_skill, not_(equal_to(context.manifest_skill))) manifest_skill.update_ts = context.update_ts assert_that(manifest_skill, (equal_to(context.manifest_skill)))
Example #2
Source File: device_skill_manifest.py From selene-backend with GNU Affero General Public License v3.0 | 5 votes |
def get_skill_manifest_no_device_specific(context): device_skill_repo = DeviceSkillRepository(context.db) skill_manifest = device_skill_repo.get_skill_manifest_for_device( context.device_id ) assert_that(len(skill_manifest), equal_to(1)) remaining_skill = skill_manifest[0] assert_that( remaining_skill.skill_gid, not_(equal_to(context.device_specific_skill.skill_gid)) )
Example #3
Source File: test_dataset.py From data.world-py with Apache License 2.0 | 5 votes |
def test_tables_broken_schema(self, simpsons_broken_dataset): assert_that(calling(simpsons_broken_dataset.tables.get).with_args( 'simpsons_episodes'), not_(raises(Exception))) assert_that(simpsons_broken_dataset.tables.get('simpsons_episodes'), not_none())
Example #4
Source File: test_dataset.py From data.world-py with Apache License 2.0 | 5 votes |
def test_dataframe_broken_schema(self, simpsons_broken_dataset): assert_that(calling(simpsons_broken_dataset.dataframes.get).with_args( 'simpsons_episodes'), not_(raises(Exception))) assert_that(simpsons_broken_dataset.dataframes.get( 'simpsons_episodes'), not_none())
Example #5
Source File: remove_bond_test.py From netman with Apache License 2.0 | 5 votes |
def test_removes_bond_from_get_bonds(self): self.client.remove_bond(42) assert_that(self.client.get_bonds(), not_(has_item(42)))
Example #6
Source File: remove_interface_from_bond_test.py From netman with Apache License 2.0 | 5 votes |
def test_removes_interface_from_bond(self): self.client.remove_interface_from_bond(self.test_port) bond = self.client.get_bond(42) assert_that(bond.members, not_(has_item(self.test_port)))
Example #7
Source File: draining.py From clusterman with Apache License 2.0 | 5 votes |
def check_queues_empty(context): drain_message_response = sqs.receive_message(QueueUrl=context.drain_url) termination_message_response = sqs.receive_message(QueueUrl=context.termination_url) warning_message_response = sqs.receive_message(QueueUrl=context.warning_url) assert_that(drain_message_response, not_(has_key('Messages'))) assert_that(termination_message_response, not_(has_key('Messages'))) assert_that(warning_message_response, not_(has_key('Messages')))
Example #8
Source File: assertion_tools.py From fake-switches with Apache License 2.0 | 5 votes |
def _matches(self, other): assert_that(other, is_(not_(None)), "Lookup node doesn't exist") nodes = other.xpath(self.xpath) assert_that(nodes, has_length(1), "Nodes length should be 1 element") assert_that(nodes[0].text, self.matcher) return True
Example #9
Source File: report_steps.py From allure-python with Apache License 2.0 | 5 votes |
def step_scenario(context, scenario): matcher = partial(match, not_, has_test_case, scenario) context.scenario = matcher assert_that(context.allure_report, matcher())
Example #10
Source File: report_steps.py From allure-python with Apache License 2.0 | 5 votes |
def step_no_before_fixture(context, fixture): context_matcher = context.scenario matcher = partial(context_matcher, not_, has_container, context.allure_report, has_before, fixture) assert_that(context.allure_report, matcher())
Example #11
Source File: report_steps.py From allure-python with Apache License 2.0 | 5 votes |
def step_impl(context, fixture): context_matcher = context.scenario matcher = partial(context_matcher, not_, has_container, context.allure_report, has_after, fixture) assert_that(context.allure_report, matcher())
Example #12
Source File: test_allure_library.py From allure-python with Apache License 2.0 | 5 votes |
def should_not_has_tag(conetxt, tag): allure_report, test_case_matcher = conetxt tag_matcher = partial(test_case_matcher, not_, has_tag, tag) assert_that(allure_report, tag_matcher())
Example #13
Source File: test_allure_library.py From allure-python with Apache License 2.0 | 5 votes |
def should_not_has_severity(context): allure_report, test_case_matcher = context severity_matcher = partial(test_case_matcher, not_, has_severity, anything) assert_that(allure_report, severity_matcher())