def test_postgresql_neutron_joined_with_db(self): self.is_relation_made.return_value = True with self.assertRaises(Exception) as context: hooks.pgsql_neutron_db_joined() self.assertEqual(context.exception.message, 'Attempting to associate a postgresql database when' ' there is already associated a mysql one')
def test_postgresql_neutron_joined_with_db(self): self.is_relation_made.return_value = True with self.assertRaises(Exception) as context: hooks.pgsql_neutron_db_joined() self.assertEqual( context.exception.message, 'Attempting to associate a postgresql database when' ' there is already associated a mysql one')
def test_postgresql_neutron_db_joined(self): self.is_relation_made.return_value = False hooks.pgsql_neutron_db_joined() self.relation_set.assert_called_with(database='neutron')